@usecapsule/core-components 3.4.0 → 3.4.1-dev.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-286db996.js +2 -0
- package/dist/capsule/p-286db996.js.map +1 -0
- package/dist/capsule/p-7be8987f.entry.js +20 -0
- package/dist/capsule/p-7be8987f.entry.js.map +1 -0
- package/dist/capsule/p-9e64a60e.entry.js +2 -0
- package/dist/capsule/p-9e64a60e.entry.js.map +1 -0
- package/dist/capsule/{p-32cdf894.entry.js → p-b96e357a.entry.js} +2 -2
- package/dist/capsule/p-b96e357a.entry.js.map +1 -0
- package/dist/capsule/p-c33942ad.entry.js +2 -0
- package/dist/capsule/p-c33942ad.entry.js.map +1 -0
- package/dist/capsule/p-cfc382c0.entry.js +2 -0
- package/dist/capsule/{p-de2a16e4.entry.js → p-d165df27.entry.js} +2 -2
- package/dist/capsule/{p-41bc3c58.entry.js → p-f0cd0482.entry.js} +2 -2
- package/dist/cjs/capsule.cjs.js +1 -1
- package/dist/cjs/cpsl-alert_34.cjs.entry.js +122 -65
- package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-col.cjs.entry.js +1 -1
- package/dist/cjs/cpsl-grid.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-hero.cjs.entry.js +4 -3
- package/dist/cjs/cpsl-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-identicon.cjs.entry.js +76 -30
- package/dist/cjs/cpsl-identicon.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-nav-button.cjs.entry.js +40 -0
- package/dist/cjs/cpsl-nav-button.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-row.cjs.entry.js +1 -1
- package/dist/cjs/index-65f57499.js +4 -4
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/prand-a35ea6b2.js +209 -0
- package/dist/cjs/prand-a35ea6b2.js.map +1 -0
- package/dist/collection/assets/icons/check-circle-filled.svg +5 -0
- package/dist/collection/assets/icons/cosmos.svg +12 -0
- package/dist/collection/assets/icons/ethereum.svg +4 -0
- package/dist/collection/assets/icons/folder.svg +5 -0
- package/dist/collection/assets/icons/hero-plus-circle-capsule.svg +14 -0
- package/dist/collection/assets/icons/hero-plus-circle.svg +7 -0
- package/dist/collection/assets/icons/index.js +8 -1
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/assets/icons/plus-circle.svg +1 -1
- package/dist/collection/assets/icons/solana.svg +19 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +44 -104
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -1
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +3 -3
- package/dist/collection/components/cpsl-auth-modal/cpsl-auth-modal.css +2 -1
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.css +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
- package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
- package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +2 -2
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +1 -1
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-hero/cpsl-hero.css +29 -2
- package/dist/collection/components/cpsl-hero/cpsl-hero.js +6 -5
- package/dist/collection/components/cpsl-hero/cpsl-hero.js.map +1 -1
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.css +17 -10
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.js +101 -36
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.js.map +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js.map +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js +1 -1
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.css +107 -0
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.js +175 -0
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.js.map +1 -0
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.css +0 -42
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +2 -50
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-popover/cpsl-popover.js +2 -2
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.js +2 -2
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +1 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
- package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/lib/prando.js +187 -0
- package/dist/collection/lib/prando.js.map +1 -0
- package/dist/collection/utils/prand.js +16 -0
- package/dist/collection/utils/prand.js.map +1 -0
- package/dist/esm/capsule.js +1 -1
- package/dist/esm/cpsl-alert_34.entry.js +122 -65
- package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
- package/dist/esm/cpsl-col.entry.js +1 -1
- package/dist/esm/cpsl-grid.entry.js +2 -2
- package/dist/esm/cpsl-hero.entry.js +4 -3
- package/dist/esm/cpsl-hero.entry.js.map +1 -1
- package/dist/esm/cpsl-identicon.entry.js +76 -30
- package/dist/esm/cpsl-identicon.entry.js.map +1 -1
- package/dist/esm/cpsl-nav-button.entry.js +36 -0
- package/dist/esm/cpsl-nav-button.entry.js.map +1 -0
- package/dist/esm/cpsl-row.entry.js +1 -1
- package/dist/esm/index-91db3414.js +4 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/prand-c8323494.js +205 -0
- package/dist/esm/prand-c8323494.js.map +1 -0
- package/dist/types/assets/icons/index.d.ts +7 -0
- package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +0 -15
- package/dist/types/components/cpsl-hero/cpsl-hero.d.ts +2 -2
- package/dist/types/components/cpsl-identicon/cpsl-identicon.d.ts +5 -4
- package/dist/types/components/cpsl-nav-button/cpsl-nav-button.d.ts +43 -0
- package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +0 -6
- package/dist/types/components.d.ts +93 -39
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/prando.d.ts +92 -0
- package/dist/types/utils/prand.d.ts +3 -0
- package/package.json +2 -4
- package/dist/capsule/p-0e558c7f.entry.js +0 -10
- package/dist/capsule/p-0e558c7f.entry.js.map +0 -1
- package/dist/capsule/p-0e6007ae.entry.js +0 -20
- package/dist/capsule/p-0e6007ae.entry.js.map +0 -1
- package/dist/capsule/p-32cdf894.entry.js.map +0 -1
- package/dist/capsule/p-3b042fd1.entry.js +0 -2
- package/dist/capsule/p-5d62e610.entry.js +0 -2
- package/dist/capsule/p-5d62e610.entry.js.map +0 -1
- package/dist/cjs/cpsl-animation.cjs.entry.js +0 -20133
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +0 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.css +0 -17
- package/dist/esm/cpsl-animation.entry.js +0 -20129
- package/dist/esm/cpsl-animation.entry.js.map +0 -1
- /package/dist/capsule/{p-3b042fd1.entry.js.map → p-cfc382c0.entry.js.map} +0 -0
- /package/dist/capsule/{p-de2a16e4.entry.js.map → p-d165df27.entry.js.map} +0 -0
- /package/dist/capsule/{p-41bc3c58.entry.js.map → p-f0cd0482.entry.js.map} +0 -0
- /package/dist/types/Users/{norwood/capsule-repos → taylorbosch/Documents/GitHub/Capsule}/web-sdk/packages/core-components/.stencil/scripts/buildAssets.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["cpslAlertCss","CpslAlertStyle0","CpslAlert","iconType","this","variant","undefined","render","h","Host","key","class","error","warning","success","icon","cpslAppBarCss","CpslAppBarStyle0","CpslAppBar","style","Object","assign","height","zIndexOverride","zIndex","part","position","_assertThisInitialized","self","ReferenceError","_inheritsLoose","subClass","superClass","prototype","create","constructor","__proto__","_config","autoSleep","force3D","nullTargetWarn","units","lineHeight","_defaults","duration","overwrite","delay","_suppressOverwrites","_reverting","_context","_bigNum","_tinyNum","_2PI","Math","PI","_HALF_PI","_gsID","_sqrt","sqrt","_cos","cos","_sin","sin","_isString","value","_isFunction","_isNumber","_isUndefined","_isObject","_isNotFalse","_windowExists","window","_isFuncOrString","_isTypedArray","ArrayBuffer","isView","_isArray","Array","isArray","_strictNumExp","_numExp","_numWithUnitExp","_complexStringNumExp","_relExp","_delimitedValueExp","_unitExp","_globalTimeline","_win","_coreInitted","_doc","_globals","_installScope","_coreReady","_install","scope","_merge","gsap","_missingPlugin","property","console","warn","_warn","message","suppress","_addGlobal","name","obj","_emptyFunc","_startAtRevertConfig","suppressEvents","isStart","kill","_revertConfigNoKill","_revertConfig","_reservedProps","_lazyTweens","_lazyLookup","_lastRenderedFrame","_plugins","_effects","_nextGCFrame","_harnessPlugins","_callbackNames","_harness","targets","target","harnessPlugin","i","_gsap","harness","length","targetTest","GSCache","splice","_getCache","toArray","_getProperty","v","getAttribute","_forEachName","names","func","split","forEach","_round","round","_roundPrecise","_parseRelative","start","operator","charAt","end","parseFloat","substr","_arrayContainsAny","toSearch","toFind","l","indexOf","_lazyRender","a","slice","tween","_lazy","_lazySafeRender","animation","time","force","_initted","_startAt","_numericIfPossible","n","match","trim","_passThrough","p","_setDefaults","defaults","_setKeyframeDefaults","excludeDuration","base","toMerge","_mergeDeep","_copyExcluding","excluding","copy","_inheritDefaults","vars","parent","keyframes","inherit","_dp","_arraysMatch","a1","a2","_addLinkedListItem","child","firstProp","lastProp","sortBy","prev","t","_prev","_next","_removeLinkedListItem","next","_removeFromParent","onlyIfParentHasAutoRemove","autoRemoveChildren","remove","_act","_uncache","_end","_dur","_start","_dirty","_recacheAncestors","totalDuration","_rewindStartAt","totalTime","revert","immediateRender","autoRevert","_hasNoPausedAncestors","_ts","_elapsedCycleDuration","_repeat","_animationCycle","_tTime","_rDelay","tTime","cycleDuration","whole","floor","_parentToChildTotalTime","parentTime","_tDur","_setEnd","abs","_rts","_alignPlayhead","smoothChildTiming","_time","_postAddChecks","timeline","add","rawTime","_clamp","_zTime","_addToTimeline","skipChecks","_parsePosition","_delay","timeScale","_sort","_isFromOrFromStart","_recent","_scrollTrigger","trigger","ScrollTrigger","_attemptInitTween","_initTween","_pt","lazy","_ticker","frame","push","_parentPlayheadIsBeforeStart","_ref","_lock","_ref2","data","_renderZeroDurationTween","prevRatio","ratio","repeatDelay","pt","iteration","prevIteration","_yoyo","repeatRefresh","invalidate","_from","r","d","_onUpdate","_callback","_prom","_findNextPauseTween","prevTime","_first","_last","_setDuration","skipUncache","leavePlayhead","repeat","dur","totalProgress","_onUpdateTotalDuration","Timeline","_zeroPosition","endTime","percentAnimation","labels","recent","clippedDuration","offset","isPercent","isNaN","replace","_createTweenType","type","params","isLegacy","varsIndex","irVars","runBackwards","startAt","Tween","_conditionalReturn","min","max","getUnit","exec","clamp","_slice","_isArrayLike","nonEmpty","nodeType","_flatten","ar","leaveStrings","accumulator","_accumulator","apply","selector","_wake","call","querySelectorAll","el","current","nativeElement","createElement","shuffle","sort","random","distribute","each","ease","_parseEase","from","cache","isDecimal","ratios","axis","ratioX","ratioY","center","edges","distances","originX","originY","x","y","j","wrapAt","grid","getBoundingClientRect","left","amount","b","u","_invertEase","_roundModifier","pow","raw","snap","snapTo","radius","is2D","values","increment","closest","dx","dy","roundingIncrement","returnFunction","pipe","_len","arguments","functions","_key","reduce","f","unitize","unit","normalize","mapRange","_wrapArray","wrapper","index","wrap","range","wrapYoyo","total","_replaceRandom","s","nums","inMin","inMax","outMin","outMax","inRange","outRange","interpolate","progress","mutate","isString","master","interpolators","il","_addPropTween","_renderPropTweens","_getLabelInDirection","fromTime","backward","distance","label","executeLazyFirst","callback","prevContext","context","_ctx","result","callbackScope","_interrupt","scrollTrigger","_quickTween","_registerPluginQueue","_createPlugin","config","headless","isFunc","Plugin","init","_props","instanceDefaults","_killPropTweensOf","modifier","_addPluginModifier","rawVars","statics","get","getSetter","_getSetter","aliases","register","prop","toUpperCase","PropTween","_255","_colorLookup","aqua","lime","silver","black","maroon","teal","blue","navy","white","olive","yellow","orange","gray","purple","green","red","pink","cyan","transparent","_hue","m1","m2","splitColor","toHSL","forceAlpha","g","wasHSL","parseInt","map","Number","_colorOrderData","c","_colorExp","_formatColors","orderMatchData","colors","shell","color","join","shift","RegExp","_hslExp","_colorStringFilter","combined","lastIndex","test","_tickerActive","_getTime","Date","now","_lagThreshold","_adjustedLag","_startTime","_lastUpdate","_gap","_nextTime","_listeners","_id","_req","_raf","_self","_delta","_i","_tick","elapsed","manual","overlap","dispatch","tick","deltaRatio","fps","wake","document","gsapVersions","version","GreenSockGlobals","requestAnimationFrame","sleep","setTimeout","cancelAnimationFrame","clearTimeout","lagSmoothing","threshold","adjustedLag","Infinity","_fps","once","prioritize","_easeMap","_customEaseExp","_quotesExp","_parseObjectInString","val","parsedVal","lastIndexOf","_valueInParentheses","open","close","nested","substring","_configEaseFromString","_CE","_propagateYoyoEase","isYoyo","yoyoEase","_ease","_yEase","defaultEase","_insertEase","easeIn","easeOut","easeInOut","lowercaseName","toLowerCase","_easeInOutFromOut","_configElastic","amplitude","period","p1","p2","p3","asin","_configBack","overshoot","power","Linear","easeNone","none","n1","n2","n3","SteppedEase","steps","immediateStart","id","set","Animation","yoyo","_proto","startTime","_totalTime","_ptLookup","_pTime","_ps","paused","includeRepeats","wrapRepeats","prevIsReverting","globalTime","_sat","seek","restart","includeDelay","play","reversed","reverse","pause","atTime","resume","isActive","eventCallback","then","onFulfilled","Promise","resolve","_resolve","_then","_Animation","_this","sortChildren","_proto2","to","fromTo","fromVars","toVars","delayedCall","staggerTo","stagger","onCompleteAll","onCompleteAllParams","onComplete","onCompleteParams","staggerFrom","staggerFromTo","tDur","crossingStart","prevPaused","pauseTween","prevStart","rewinding","doesWrap","onRepeat","_hasPause","_forcing","onUpdate","adjustedTime","_this2","addLabel","getChildren","tweens","timelines","ignoreBeforeTime","getById","animations","removeLabel","killTweensOf","_totalTime2","addPause","removePause","props","onlyActive","getTweensOf","_overwritingTween","parsedTargets","isGlobalTime","children","_targets","tweenTo","tl","_vars","_onStart","onStart","onStartParams","initted","tweenFromTo","fromPosition","toPosition","nextLabel","afterTime","previousLabel","beforeTime","currentLabel","shiftChildren","adjustLabels","soft","clear","includeLabels","updateRoot","_addComplexStringPropTween","setter","stringFilter","funcParam","_renderComplexString","matchIndex","startNums","endNum","chunk","startNum","hasRandom","e","m","fp","optional","currentValue","parsedStart","_setterPlain","_setterFuncWithParam","_setterFunc","_forceAllPropTweens","_renderBoolean","_renderPlain","_processVars","_parseFuncOrString","_checkPlugin","plugin","ptLookup","priority","prevStartAt","fullTargets","autoOverwrite","_overwrite","cleanVars","hasPriority","gsData","harnessVars","overwritten","_ptCache","_op","_sortPropTweensByPriority","_onInit","_updatePropTweens","startIsRelative","skipRecursion","ptCache","rootPT","lookup","_addAliasesToVars","propertyAliases","_parseKeyframe","allProps","easeEach","_staggerTweenProps","_staggerPropsToSkip","_Animation2","skipInherit","_this3","_this3$vars","curTarget","staggerFunc","staggerVarsToMerge","kf","_proto3","isNegative","resetTo","killingTargets","propTweenLookup","firstPT","overwrittenProps","curLookup","curOverwriteProps","onReverseComplete","onReverseCompleteParams","_setterAttribute","setAttribute","hasNonDependentRemaining","op","dep","_setterWithModifier","mSet","mt","pt2","first","last","pr","change","renderer","_proto4","TweenMax","TweenLite","TimelineLite","TimelineMax","_media","_emptyArray","_lastMediaTime","_contextID","_dispatch","_onMediaChange","matches","queries","conditions","anyMatch","toggled","matchMedia","onMatch","Context","_r","isReverted","_proto5","prevSelector","ignore","getTweens","_this4","o","MatchMedia","contexts","_proto6","cond","mq","active","addListener","addEventListener","registerPlugin","_len2","args","_key2","getProperty","uncache","getter","format","quickSetter","setters","quickTo","_merge2","isTweening","registerEffect","_ref3","effect","plugins","extendTimeline","pluginName","registerEase","parseEase","exportRoot","includeDelayedCalls","matchMediaRefresh","found","removeEventListener","utils","install","effects","ticker","globalTimeline","core","globals","getCache","reverting","toAdd","suppressOverwrites","_getPluginPropTween","_addModifiers","modifiers","_buildModifierPlugin","temp","_docElement","_pluginInitted","_tempDiv","_recentSetterPlugin","_transformProps","_RAD2DEG","_DEG2RAD","_atan2","atan2","_capsExp","_horizontalExp","_complexExp","_propertyAliases","autoAlpha","scale","alpha","_renderCSSProp","_renderPropWithEnd","_renderCSSPropWithBeginning","_renderRoundedCSSProp","_renderNonTweeningValue","_renderNonTweeningValueOnlyAtEnd","_setterCSSStyle","_setterCSSProp","setProperty","_setterTransform","_setterScale","scaleX","scaleY","_setterScaleWithRender","renderTransform","_setterTransformWithRender","_transformProp","_transformOriginProp","_saveStyle","isNotCSS","tfm","_get","zOrigin","transform","svg","svgo","_removeIndependentTransforms","translate","removeProperty","_revertStyle","_getStyleSaver","properties","saver","save","_supports3D","_createElement","ns","createElementNS","_getComputedProperty","skipPrefixFallback","cs","getComputedStyle","getPropertyValue","_checkPropPrefix","_prefixes","element","preferPrefix","_initCore","documentElement","cssText","_getBBoxHack","swapIfPossible","ownerSVGElement","oldParent","parentNode","oldSibling","nextSibling","oldCSS","bbox","appendChild","display","getBBox","_gsapBBox","insertBefore","removeChild","_getAttributeFallbacks","attributesArray","hasAttribute","_getBBox","bounds","width","_isSVG","getCTM","_removeProperty","first2Chars","removeAttribute","_addNonTweeningPT","beginning","onlySetAtEnd","_nonConvertibleUnits","deg","rad","turn","_nonStandardLayouts","flex","_convertToUnit","curValue","curUnit","horizontal","isRootSVG","tagName","measureProperty","toPixels","toPercent","px","isSVG","body","_parseTransform","origin","_firstTwoOnly","_specialProps","_tweenComplexCSSString","startValues","startValue","endValue","endUnit","startUnit","endValues","_keywordToPercent","top","bottom","right","_convertKeywordsToPercentages","_renderClearProps","clearTransforms","clearProps","_identity2DMatrix","_rotationalProperties","_isNullTransform","_getComputedTransformMatrixAsArray","matrixString","_getMatrix","force2D","matrix","addedToDOM","baseVal","consolidate","offsetParent","nextElementSibling","_applySVGOrigin","originIsAbsolute","smooth","matrixArray","pluginToAddPropTweensTo","xOriginOld","xOrigin","yOriginOld","yOrigin","xOffsetOld","xOffset","yOffsetOld","yOffset","tx","ty","originSplit","determinant","invertedScaleX","z","rotation","rotationX","rotationY","skewX","skewY","perspective","angle","a12","a22","t1","t2","t3","a13","a23","a33","a42","a43","a32","rotate","forceCSS","xPercent","offsetWidth","yPercent","offsetHeight","transformPerspective","_renderSVGTransforms","_renderCSSTransforms","_renderNon3DTransforms","_addPxTranslate","_zeroDeg","_zeroPx","_endParenthesis","transforms","use3D","a11","a21","tan","_addRotationalPropTween","cap","finalValue","direction","_assign","source","_addRawTransformPTs","startCache","exclude","endCache","side","CSSPlugin","specialProp","relative","isTransformRelated","transformPropTween","inlineProps","styles","visibility","parseTransform","smoothOrigin","autoRound","checkPrefix","getStyleSaver","positionAndScale","others","all","gsapWithCSS","cpslAuthModalCss","CpslAuthModalStyle0","mm","CpslAuthModal","toggleModal","hasAnimatedIn","handleAnimation","componentDidLoad","MOBILE_SIZE","modalWrapperEl","opacity","isMobile","hasFooter","footerSlotEl","assignedNodes","innerWidth","cpslModalEntering","emit","cpslModalEntered","enterTransitionDuration","cpslModalExiting","cpslModalExited","_a","exitTransitionDuration","modalContainerEl","footerEl","shadowRoot","getElementById","Modal","noOverlay","cpslAvatarCss","CpslAvatarStyle0","CpslAvatar","src","alt","cpslButtonCss","CpslButtonStyle0","CpslButton","primary","secondary","tertiary","ghost","destructive","disabled","fullWidth","small","size","medium","as","href","cpslButtonGroupCss","CpslButtonGroupStyle0","CpslButtonGroup","selectItem","buttonSlots","item","selectedId","classList","componentWillRender","otherSlots","cpslCardCss","CpslCardStyle0","CpslCard","card","cpslCheckboxCss","CpslCheckboxStyle0","CpslCheckbox","handleCheckboxClick","cpslCheckboxChanged","checked","onClick","container","cpslCodeInputCss","CpslCodeInputStyle0","CpslCodeInput","handleInput","ind","ev","inputElements","inputs","inputType","newCode","code","focus","cpslInput","handleKeyDown","setSelectionRange","handleFocus","input","handlePaste","pastedCode","clipboardData","getData","fill","_","Boolean","errorText","onKeyDown","onInput","onFocus","onPaste","_b","inputMode","helperText","cpslDividerCss","CpslDividerStyle0","CpslDivider","cpslDrawerCss","CpslDrawerStyle0","CpslDrawer","closedAnchorPosition","getContainerHeight","showTransition","containerEl","clientHeight","setHeight","anchor","startingAnchor","anchorPosition","transitionDuration","transitionTimingFunction","transitionFunction","DEFAULT_Z_INDICES","modal","Icons","alertCircle","AlertCircle","angelListBrand","AngelListBrand","angelList","AngelList","appleBrand","AppleBrand","apple","Apple","arrowCircleBrokenDownLeft","ArrowCircleBrokenDownLeft","arrowNarrow","ArrowNarrow","arrow","Arrow","backupKit","BackupKit","bank","Bank","brush","Brush","capsuleLogo","CapsuleLogo","capsuleRingsDark","CapsuleRingsDark","capsuleRings","CapsuleRings","capsule","Capsule","checkCircleFilled","CheckCircleFilled","checkCircle","CheckCircle","check","Check","chevronUp","ChevronUp","clock","Clock","Close","clubhouseBrand","ClubhouseBrand","clubhouse","Clubhouse","Copy","cosmos","Cosmos","creditCard","CreditCard","cube","Cube","decentBrand","DecentBrand","decent","Decent","discordBrand","DiscordBrand","discord","Discord","dot","Dot","downloadCloud","DownloadCloud","download","Download","dribbbleBrand","DribbbleBrand","dribbble","Dribbble","earth","Earth","ethereum","Ethereum","eyeOff","EyeOff","eye","Eye","facebookBrand","FacebookBrand","facebook","Facebook","farcasterBrand","FarcasterBrand","farcaster","Farcaster","figmaBrand","FigmaBrand","figma","Figma","file","File","folder","Folder","githubBrand","GithubBrand","github","Github","globe","Globe","googleBrand","GoogleBrand","google","Google","helpCircle","HelpCircle","heroAlertCircle","HeroAlertCircle","heroCheckmarkCapsule","HeroCheckmarkCapsule","heroCheckmark","HeroCheckmark","heroEmail","HeroEmail","heroExternalConnection","HeroExternalConnection","heroLock","HeroLock","heroPasskey","HeroPasskey","heroPhone","HeroPhone","heroPlusCircleCapsule","HeroPlusCircleCapsule","heroPlusCircle","HeroPlusCircle","heroWallet","HeroWallet","home","Home","image","Image","infoCircle","InfoCircle","instagramBrand","InstagramBrand","instagram","Instagram","Key","lightning01","Lightning01","lightning","Lightning","linkExternal","LinkExternal","linkedinBrand","LinkedinBrand","linkedin","Linkedin","logOut","LogOut","mail","Mail","menu","Menu","moonpayBrand","MoonpayBrand","moreLoginOptions","MoreLoginOptions","phone","Phone","pintrestBrand","PintrestBrand","pintrest","Pintrest","plusCircle","PlusCircle","puzzlePiece","PuzzlePiece","qrCode02","QrCode02","qrCode","QrCode","rampNetworkBrand","RampNetworkBrand","rampNetwork","RampNetwork","redditBrand","RedditBrand","reddit","Reddit","refresh","Refresh","search","Search","send","Send","settings","Settings","shield","Shield","signalBrand","SignalBrand","signal","Signal","snapchatBrand","SnapchatBrand","snapchat","Snapchat","solana","Solana","stars","Stars","stripeBrand","StripeBrand","telegramBrand","TelegramBrand","telegram","Telegram","tikTokBrand","TikTokBrand","tikTok","TikTok","tumblrBrand","TumblrBrand","tumblr","Tumblr","twitterBrand","TwitterBrand","twitter","Twitter","wallet","Wallet","X","youtubeBrand","YoutubeBrand","youtube","Youtube","AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BQ2","BQ3","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CD2","CF","CH","CK","CL","CM","CN","CO","CR","CU","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DS","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB2","GB","GD","GE","GG","GH","GI","GL","GM","GN","GQ","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PN","PR","PS","PT","PW","PY","QA","RO","RS","RU","RW","SA","SB","SC","SE","SG","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW","cpslDropdownCss","CpslDropdownStyle0","CpslDropdown","toggleDropdown","isOpen","emitEvent","selectedItem","selectedItemChange","handleItemSelect","handleSearchQueryChange","event","searchQuery","filteredItems","items","filter","includes","handleClickOutside","contains","handleSelectedItemChange","newValue","handleOpenChange","adjustPosition","addClickOutsideListener","removeClickOutsideListener","handleResize","dropdownOptions","querySelector","parentRect","parentElement","searchBar","viewportHeight","innerHeight","maxHeight","availableHeight","componentWillLoad","disconnectedCallback","selectedLabel","_c","innerHTML","hasCpslSearch","placeholder","cpslFileUploadCss","CpslFileUploadStyle0","CpslFileUpload","inputId","inputIds","handleDrop","__awaiter$2","preventDefault","dataTransfer","isValidFile","getAsFile","addFile","dragOver","dragError","cpslOnDrop","handleDragEnter","cpslOnDragEnter","handleDragLeave","cpslOnDragLeave","handleInputChange","inputEl","files","fileTypes","cpslFileChange","uploadError","isUploading","uploadSuccess","uploadFile","removeFile","cpslFileRemoved","FileContent","hasFile","externalSrc","text","Fragment","externalFilename","TopElement","URL","createObjectURL","htmlFor","required","showOptionalLabel","drag","accept","onDrop","onDragEnter","onDragLeave","onChange","cpslIconCss","CpslIconStyle0","CpslIcon","role","cpslIconGroupCss","CpslIconGroupStyle0","isOfTypeIconType","keys","CpslIconGroup","isHovered","icons","isIcon","expanded","expandFrom","str","String","isObject","_obj$constructor","pick","k","entries","acc","DIRECTION","NONE","LEFT","FORCE_LEFT","RIGHT","FORCE_RIGHT","forceDirection","objectIncludes","arrA","arrB","dateA","dateB","getTime","regexpA","regexpB","toString","hasOwnProperty","ActionDetails","opts","startChangePos","oldValue","oldSelection","insertedCount","cursorPos","inserted","removedCount","removed","head","tail","removeDirection","IMask","InputMask","maskedClass","mask","Error","MaskedRegExp","MaskedPattern","MaskedDate","MaskedNumber","MaskedDynamic","Masked","Function","MaskedFunction","normalizeOpts","instanceOpts","_mask","startsWith","createMask","nOpts","MaskedClass","MaskElement","selectionStart","_unsafeSelectionStart","selectionEnd","_unsafeSelectionEnd","select","_unsafeSelect","KEY_Z","KEY_Y","HTMLMaskElement","super","_onKeydown","bind","_onInput","_onBeforeinput","_onCompositionEnd","rootElement","_this$input$getRootNo","_this$input$getRootNo2","_this$input","getRootNode","activeElement","bindEvents","handlers","drop","click","commit","_handlers","redo","keyCode","shiftKey","metaKey","ctrlKey","undo","isComposing","selectionChange","unbindEvents","HTMLInputMaskElement","HTMLContenteditableMaskElement","root","selection","getSelection","anchorOffset","focusOffset","createRange","setStart","firstChild","setEnd","lastChild","removeAllRanges","addRange","textContent","InputHistory","states","currentIndex","currentState","isEmpty","state","MAX_LENGTH","go","isContentEditable","masked","_value","_unmaskedValue","_rawInputValue","history","_saveSelection","_onChange","_onDrop","_onFocus","_onClick","_onUndo","_onRedo","alignCursor","alignCursorFriendly","_bindEvents","updateValue","maskEquals","_this$masked","updateOptions","unmaskedValue","updateControl","rawInputValue","typedValue","typedValueEquals","displayValue","_unbindEvents","_fireEvent","listeners","_cursorChanging","_changingCursorPos","pos","_selection","newUnmaskedValue","newRawInputValue","newDisplayValue","isChanged","_fireChangeEvents","_historyChanging","restOpts","updateMask","updateOpts","optionsIsChanged","updateCursor","_delayUpdateCursor","_abortUpdateCursor","_inputEvent","isComplete","nearestInputPos","on","handler","off","hIndex","details","oldRawValue","doCommit","stopPropagation","_applyHistoryState","destroy","ChangeDetails","prep","rawInserted","tailShift","skip","aggregate","consumed","equals","ContinuousTailDetails","stop","extend","appendTo","append","_appendPlaceholder","unshift","beforePos","shiftChar","_update","DEFAULTS","_initialized","withValueRefresh","reset","flags","parse","extractInput","isFilled","totalInputPositions","fromPos","toPos","extractTail","appendTail","_appendCharRaw","ch","_appendChar","checkTail","consistentState","doPrepareChar","autofix","noFixState","fixDetails","pad","chDetails","consistentTail","appended","doValidate","beforeTailState","tailDetails","_appendEager","_beforeTailState","doPrepare","ci","doSkipInvalid","eager","fn","_refreshing","rawInput","ret","runIsolated","_isolated","skipInvalid","prepare","prepareChar","validate","deleteCount","tailPos","eagerRemove","valLength","tval","EMPTY_VALUES","ChunksTailDetails","chunks","tailChunk","lastChunk","extendLast","firstTailChunk","blockIndex","lastBlockIter","_mapPosToBlock","chunkBlock","_stops","_blocks","remainChars","cstate","chunkShiftPos","PatternCursor","_log","ok","block","_blockStartPos","pushState","popState","pop","bindBlock","_pushLeft","_this$block","_pushRight","pushLeftBeforeFilled","isFixed","pushLeftBeforeInput","pushLeftBeforeRequired","isOptional","pushRightBeforeFilled","pushRightBeforeInput","pushRightBeforeRequired","PatternFixedDefinition","isUnmasking","_isRawInput","minPos","maxPos","appendEager","char","isResolved","PatternInputDefinition","placeholderChar","displayChar","maskOpts","currentMaskFlags","boundPos","_flags$_beforeTailSta","DEFAULT_DEFINITIONS","definitions","_rebuildMask","defs","exposeBlock","_maskedBlocks","pattern","unmaskingBlock","optionalBlock","blocks","bNames","bName","expose","bOpts","blockOpts","maskedBlock","RepeatBlock","isInput","STOP_CHAR","ESCAPE_CHAR","def","maskedState","bi","every","_this$_mapPosToBlock","startBlockIndex","blockIter","blockDetails","chunkTail","_forEachBlocksInRange","bFromPos","bToPos","blockChunk","_findStopBefore","stopBefore","si","toBlockIndex","startBlockIter","endBlockIndex","_blocks2","accVal","blockStartPos","fromBlockIter","toBlockIter","isSameBlock","fromBlockStartPos","fromBlockEndPos","removeDetails","cursor","maskedBlocks","indices","gi","InputDefinition","FixedDefinition","cpslInputCss","CpslInputStyle0","CpslInput","maskedInput","disableSlots","enableSlots","emitInputChange","emitValueChange","onBlur","hasFocus","focusedValue","cpslBlur","cpslFocus","pasteData","initialSelectionStart","newVal","_d","cpslPaste","focusInput","nativeInput","handleDisable","handleSetupMask","handleValueChange","initButtons","noAutoDisable","endEl","startEl","cpslChange","focused","contrastText","ref","autoCapitalize","autocapitalize","autoComplete","autocomplete","autoCorrect","autocorrect","autoFocus","autofocus","enterKeyHint","enterkeyhint","inputmode","minLength","minlength","maxLength","maxlength","multiple","readOnly","readonly","spellcheck","defaultValue","cpslNavButtonGroupCss","CpslNavButtonGroupStyle0","CpslNavButtonGroup","cpslOverlayCss","CpslOverlayStyle0","CpslOverlay","toggleHeight","overflow","cpslPaginationCss","CpslPaginationStyle0","CpslPagination","handlePrevClick","currentPage","handleNextClick","totalPages","handlePageClick","watchChange","cpslPaginationChanged","initialPage","visiblePages","filteredPages","isFirstSelected","isLastSelected","isFirstOrLastSelected","remainingVisible","halfRemaining","numberBefore","numberAfter","beforeHalf","afterHalf","pagesAfter","page","cpslPillCss","CpslPillStyle0","CpslPill","cpslPopoverCss","CpslPopoverStyle0","CpslPopover","triggerClicked","configureTriggerInteraction","triggerAction","destroyTriggerInteraction","triggerEl","triggerCallbacks","eventName","__awaiter$1","present","preventBlur","setPosition","anchorEl","windowWidth","windowHeight","elWidth","clientWidth","elHeight","anchorOriginHorizontal","positionX","anchorOriginVertical","positionY","windowPadding","cpslOpen","cpslClose","closePopover","onTriggerChange","onAnchorChange","onOpenChange","transformOriginHorizontal","transformOriginVertical","autoWidth","cpslProgressIndicatorCss","CpslProgressIndicatorStyle0","CpslProgressIndicator","totalSteps","resp","previous","step","canPromise","toSJISFunction","CODEWORDS_COUNT","getSymbolSize","getSymbolTotalCodewords","digit","setToSJISFunction","toSJIS","kanji","exports","L","bit","M","Q","H","fromString","string","lcStr","isValid","level","BitBuffer","buffer","bufIndex","put","num","putBit","getLengthInBits","bitBuffer","BitMatrix","Uint8Array","reservedBit","row","col","reserved","xor","isReserved","bitMatrix","require$$0","getRowColCoords","posCount","intervals","ceil","positions","getPositions","coords","posLength","FINDER_PATTERN_SIZE","Patterns","PATTERN000","PATTERN001","PATTERN010","PATTERN011","PATTERN100","PATTERN101","PATTERN110","PATTERN111","PenaltyScores","N1","N2","N3","N4","getPenaltyN1","points","sameCountCol","sameCountRow","lastCol","lastRow","module","getPenaltyN2","getPenaltyN3","bitsCol","bitsRow","getPenaltyN4","darkCount","modulesCount","getMaskAt","maskPattern","applyMask","getBestMask","setupFormatFunc","numPatterns","bestPattern","lowerPenalty","penalty","ECLevel","EC_BLOCKS_TABLE","EC_CODEWORDS_TABLE","getBlocksCount","errorCorrectionLevel","getTotalCodewordsCount","EXP_TABLE","LOG_TABLE","initTables","log","exp","mul","GF","coeff","mod","divident","divisor","generateECPolynomial","degree","poly","Polynomial","ReedSolomonEncoder","genPoly","initialize","encode","paddedData","remainder","buff","reedSolomonEncoder","numeric","alphanumeric","byte","TEST_KANJI","TEST_NUMERIC","TEST_ALPHANUMERIC","testKanji","testNumeric","testAlphanumeric","VersionCheck","Regex","require$$1","NUMERIC","ccBits","ALPHANUMERIC","BYTE","KANJI","MIXED","getCharCountIndicator","mode","getBestModeForData","dataStr","Utils","ECCode","require$$2","Mode","require$$3","require$$4","G18","G18_BCH","getBCHDigit","getBestVersionForDataLength","currentVersion","getCapacity","getReservedBitsCount","getTotalBitsFromDataArray","segments","totalBits","reservedBits","getBitsLength","getBestVersionForMixedData","totalCodewords","ecTotalCodewords","dataTotalCodewordsBits","usableBits","getBestVersionForData","seg","ecl","getLength","getEncodedBits","G15","G15_MASK","G15_BCH","NumericData","write","group","remainingNum","numericData","ALPHA_NUM_CHARS","AlphanumericData","alphanumericData","ByteData","TextEncoder","byteData","KanjiData","kanjiData","dijkstra","single_source_shortest_paths","graph","predecessors","costs","PriorityQueue","make","cost_of_s_to_u","adjacent_nodes","cost_of_e","cost_of_s_to_u_plus_cost_of_e","cost_of_s_to_v","first_visit","empty","cost","msg","extract_shortest_path_from_predecessor_list","nodes","find_path","T","queue","sorter","default_sorter","require$$5","require$$6","require$$7","getStringByteLength","unescape","encodeURIComponent","getSegments","regex","getSegmentsFromString","numSegs","alphaNumSegs","byteSegs","kanjiSegs","isKanjiModeEnabled","BYTE_KANJI","segs","concat","s1","s2","getSegmentBitsLength","mergeSegments","curr","prevSeg","buildNodes","buildGraph","table","prevNodeIds","nodeGroup","currentNodeIds","node","lastCount","prevNodeId","buildSingleSegment","modesHint","bestMode","fromArray","array","path","optimizedSegs","rawSplit","AlignmentPattern","FinderPattern","MaskPattern","require$$8","Version","require$$9","FormatInfo","require$$10","require$$11","Segments","require$$12","setupFinderPattern","setupTimingPattern","setupAlignmentPattern","setupVersionInfo","bits","setupFormatInfo","setupData","inc","bitIndex","byteIndex","dark","createData","remainingByte","createCodewords","dataTotalCodewords","ecTotalBlocks","blocksInGroup2","blocksInGroup1","totalCodewordsInGroup1","dataCodewordsInGroup1","dataCodewordsInGroup2","ecCount","rs","dcData","ecData","maxDataSize","dataSize","createSymbol","estimatedVersion","rawSegments","bestVersion","dataBits","moduleCount","modules","options","toSJISFunc","hex2rgba","hex","hexCode","hexValue","getOptions","margin","light","rendererOpts","getScale","qrSize","getImageWidth","qrToImageData","imgData","qr","symbolSize","scaledMargin","palette","posDst","pxColor","iSrc","jSrc","clearCanvas","ctx","canvas","clearRect","getCanvasElement","qrData","canvasEl","getContext","createImageData","putImageData","renderToDataURL","toDataURL","quality","getColorAttrib","attrib","toFixed","svgCmd","cmd","qrToPath","moveBy","newRow","lineLength","cb","qrcodesize","bg","viewBox","svgTag","QRCode","CanvasRenderer","SvgRenderer","renderCanvas","renderFunc","argsNum","isLastArgCb","reject","__assign","__awaiter","thisArg","_arguments","P","generator","adopt","fulfilled","rejected","done","__generator","sent","trys","ops","verb","throw","return","Symbol","iterator","TypeError","__read","SuppressedError","suppressed","getErrorCorrectionLevel","content","loadImage","logoSrc","crossOrigin","onload","onerror","canvasRoundRect","w","minSize","beginPath","moveTo","arcTo","closePath","isFunction","toImage","downloadName","startDownload","saveImage","dataURL","link","dispatchEvent","MouseEvent","err","dotTypes","tile","dotSmall","rounded","square","diamond","star","fluid","fluidLine","stripe","stripeRow","stripeColumn","QRDot","_type","dotSize","draw","getNeighbor","qrCanvas","drawFunction","_drawTile","_drawDot","_drawDotSmall","_drawRounded","_drawDiamond","_drawStar","_drawFluid","_drawFluidLine","_drawStripe","_drawStripeRow","_drawStripeColumn","_drawSquare","_basicSquare","_rotateFigure","rect","_drawBasicDot","dotRate","cx","cy","arc","quadraticCurveTo","line","roundedCorners","fillRect","stroke","setRangeDisabled","i1","j1","setDisabled","getRangeTrue","isTrue","isDark","drawItem","comb","cornerTypes","circle","roundedCircle","circleRounded","circleDiamond","circleStar","QRCorner","cornerType","_drawCircle","_drawRoundedCircle","_drawCircleRounded","_drawCircleDiamond","_drawCircleStar","_radius","outer","drawRoundedSquare","drawCircle","inner","drawInnerStar","_drawBasicRounded","lineWidth","radiusOuter","radiusInner","fillStyle","strokeStyle","rTopLeft","rTopRight","rBottomRight","rBottomLeft","lineTo","defaultOptions","logo","bgColor","borderWidth","borderRadius","logoRadius","nodeQrCodeOptions","dotsOptions","cornersOptions","squareMask","dotMask","ErrorCorrectionPercents","QRCanvas","qrcodeArray","QRDATA","saveQrdata","canvasContext","defineProperty","enumerable","configurable","count","withoutMarginSize","drawBackground","drawLogo","drawDots","drawCorners","_drawLogo","coverLevel","maxHiddenDots","_e","rate","logoWidth","logoHeight","logoInnerWidth","logoInnerHeight","xStart","xEnd","yStart","yEnd","_f","inLogoRange","drawLogoWithImage","drawImage","drawLogoWithCanvas","canvasImage","createPattern","isDisabled","count_1","xBeginning","yBeginning","filterDots_1","_loop_1","_loop_2","this_1","nodeQrCodeOptions_1","count_2","dotSize_1","xBeginning_1","yBeginning_1","column","corner","QrCodeWithLogo","ifCanvasDrawed","ifImageCreated","drawImagePromiseResolve","drawImagePromiseReject","drawCanvasPromiseResolve","drawCanvasPromiseReject","defaultOption","_toCanvas","_toImage","catch","onError","batchRunFunction","drawImagePromise","drawCanvasPromise","toCanvas","downloadImage","getImage","getCanvas","cpslQrCodeCss","CpslQrCodeStyle0","CpslQrCode","url","imgEl","imageSrc","cpslRadioCss","CpslRadioStyle0","CpslRadio","handleRadioClick","cpslRadioChanged","cpslSelectCss","CpslSelectStyle0","CpslSelect","popoverEl","handleEnterPress","selectedValue","hasSelectedItem","handleClick","onValueChange","selectItemClickHandler","cpslSelectValueChange","detail","onPopoverOpen","popoverOpen","onPopoverClose","anchorElId","onMouseDown","showFormattedSelectedItem","hidden","formatValue","chevron","onKeyPress","showSearch","searchPlaceholder","onCpslInput","cpslSearchChange","dropdownMaxHeight","cpslSelectItemCss","CpslSelectItemStyle0","CpslSelectItem","handleItemClick","cpslSelectItemClick","selected","cpslSlideButtonCss","CpslSlideButtonStyle0","CpslSlideButton","dragElement","pointerDown","pos3","clientX","pointerType","onmousedown","dragMouseDown","ontouchstart","dragTouchDown","onmouseup","closeDragElement","onmousemove","elementMouseDrag","touchLocation","targetTouches","ontouchend","ontouchmove","elementTouchDrag","pos1","finishElementDrag","newPos","offsetLeft","minX","maxX","newPosPercent","startTextEl","endTextEl","startIconEl","endIconEl","endBackgroundEl","sliderHeight","containerWidth","cpslComplete","sliderContainerEl","onpointerdown","slider","startIcon","endIcon","startText","endText","cpslSpinnerCss","CpslSpinnerStyle0","CpslSpinner","cpslSwitchCss","CpslSwitchStyle0","CpslSwitch","handleSwitchClick","cpslSwitchChanged","thumb","cpslTabCss","CpslTabStyle0","CpslTab","onTabClicked","cpslTabButtonClick","tab","onTabsChanged","setSelected","onTabsInit","dispatchedFrom","composedPath","cpslTableCss","CpslTableStyle0","CpslTable","resizeOb","ResizeObserver","contentRect","containerHeight","contentWidth","containerSlotEl","contentHeight","hasHorizontalScroll","hasVerticalScroll","observe","contentContainerEl","containerHeaderEl","containerFooterEl","headerEl","shown","overlay","cpslTabsCss","CpslTabsStyle0","CpslTabs","selectedTab","selectedTabRect","getTab","tabs","cpslTabsChanged","updateSlider","updateTab","cpslTabsInit","loaded","tabsPosition","tabsBorderWidth","onCpslTabButtonClick","tabEl","find","cpslTextCss","CpslTextStyle0","CpslText","Content","subtle","inverted","contrast","weight","bold","cpslTileButtonCss","CpslTileButtonStyle0","CpslTileButton","exportparts"],"sources":["src/components/cpsl-alert/cpsl-alert.scss?tag=cpsl-alert&encapsulation=shadow","src/components/cpsl-alert/cpsl-alert.tsx","src/components/cpsl-app-bar/cpsl-app-bar.scss?tag=cpsl-app-bar&encapsulation=shadow","src/components/cpsl-app-bar/cpsl-app-bar.tsx","../../node_modules/gsap/gsap-core.js","../../node_modules/gsap/CSSPlugin.js","../../node_modules/gsap/index.js","src/components/cpsl-auth-modal/cpsl-auth-modal.scss?tag=cpsl-auth-modal&encapsulation=shadow","src/components/cpsl-auth-modal/cpsl-auth-modal.tsx","src/components/cpsl-avatar/cpsl-avatar.scss?tag=cpsl-avatar&encapsulation=shadow","src/components/cpsl-avatar/cpsl-avatar.tsx","src/components/cpsl-button/cpsl-button.scss?tag=cpsl-button&encapsulation=shadow","src/components/cpsl-button/cpsl-button.tsx","src/components/cpsl-button-group/cpsl-button-group.scss?tag=cpsl-button-group&encapsulation=shadow","src/components/cpsl-button-group/cpsl-button-group.tsx","src/components/cpsl-card/cpsl-card.scss?tag=cpsl-card&encapsulation=shadow","src/components/cpsl-card/cpsl-card.tsx","src/components/cpsl-checkbox/cpsl-checkbox.scss?tag=cpsl-checkbox&encapsulation=shadow","src/components/cpsl-checkbox/cpsl-checkbox.tsx","src/components/cpsl-code-input/cpsl-code-input.scss?tag=cpsl-code-input&encapsulation=shadow","src/components/cpsl-code-input/cpsl-code-input.tsx","src/components/cpsl-divider/cpsl-divider.scss?tag=cpsl-divider&encapsulation=shadow","src/components/cpsl-divider/cpsl-divider.tsx","src/components/cpsl-drawer/cpsl-drawer.scss?tag=cpsl-drawer&encapsulation=shadow","src/components/cpsl-drawer/cpsl-drawer.tsx","src/assets/icons/index.ts","src/components/cpsl-dropdown/cpsl-dropdown.scss?tag=cpsl-dropdown&encapsulation=shadow","src/components/cpsl-dropdown/cpsl-dropdown.tsx","src/components/cpsl-file-upload/cpsl-file-upload.scss?tag=cpsl-file-upload&encapsulation=shadow","src/components/cpsl-file-upload/cpsl-file-upload.tsx","src/components/cpsl-icon/cpsl-icon.scss?tag=cpsl-icon&encapsulation=shadow","src/components/cpsl-icon/cpsl-icon.tsx","src/components/cpsl-icon-group/cpsl-icon-group.scss?tag=cpsl-icon-group&encapsulation=shadow","src/components/cpsl-icon-group/cpsl-icon-group.tsx","../../node_modules/imask/esm/core/utils.js","../../node_modules/imask/esm/core/action-details.js","../../node_modules/imask/esm/core/holder.js","../../node_modules/imask/esm/masked/factory.js","../../node_modules/imask/esm/controls/mask-element.js","../../node_modules/imask/esm/controls/html-mask-element.js","../../node_modules/imask/esm/controls/html-input-mask-element.js","../../node_modules/imask/esm/controls/html-contenteditable-mask-element.js","../../node_modules/imask/esm/controls/input-history.js","../../node_modules/imask/esm/controls/input.js","../../node_modules/imask/esm/core/change-details.js","../../node_modules/imask/esm/core/continuous-tail-details.js","../../node_modules/imask/esm/masked/base.js","../../node_modules/imask/esm/masked/pattern/chunk-tail-details.js","../../node_modules/imask/esm/masked/pattern/cursor.js","../../node_modules/imask/esm/masked/pattern/fixed-definition.js","../../node_modules/imask/esm/masked/pattern/input-definition.js","../../node_modules/imask/esm/masked/regexp.js","../../node_modules/imask/esm/masked/pattern.js","src/components/cpsl-input/cpsl-input.scss?tag=cpsl-input&encapsulation=shadow","src/components/cpsl-input/cpsl-input.tsx","src/components/cpsl-nav-button-group/cpsl-nav-button-group.scss?tag=cpsl-nav-button-group&encapsulation=shadow","src/components/cpsl-nav-button-group/cpsl-nav-button-group.tsx","src/components/cpsl-overlay/cpsl-overlay.scss?tag=cpsl-overlay&encapsulation=shadow","src/components/cpsl-overlay/cpsl-overlay.tsx","src/components/cpsl-pagination/cpsl-pagination.scss?tag=cpsl-pagination&encapsulation=shadow","src/components/cpsl-pagination/cpsl-pagination.tsx","src/components/cpsl-pill/cpsl-pill.scss?tag=cpsl-pill&encapsulation=shadow","src/components/cpsl-pill/cpsl-pill.tsx","src/components/cpsl-popover/cpsl-popover.scss?tag=cpsl-popover&encapsulation=shadow","src/components/cpsl-popover/cpsl-popover.tsx","src/components/cpsl-progress-indicator/cpsl-progress-indicator.scss?tag=cpsl-progress-indicator&encapsulation=shadow","src/components/cpsl-progress-indicator/cpsl-progress-indicator.tsx","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/can-promise.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/utils.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/error-correction-level.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/bit-buffer.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/bit-matrix.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/alignment-pattern.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/finder-pattern.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/mask-pattern.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/error-correction-code.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/galois-field.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/polynomial.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/reed-solomon-encoder.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/version-check.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/regex.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/mode.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/version.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/format-info.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/numeric-data.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/alphanumeric-data.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/byte-data.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/kanji-data.js","../../node_modules/dijkstrajs/dijkstra.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/segments.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/core/qrcode.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/renderer/utils.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/renderer/canvas.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/renderer/svg-tag.js","../../node_modules/qrcode-with-logos/node_modules/qrcode/lib/browser.js","../../node_modules/qrcode-with-logos/lib/qrcode-with-logos.esm.js","src/components/cpsl-qr-code/cpsl-qr-code.scss?tag=cpsl-qr-code&encapsulation=shadow","src/components/cpsl-qr-code/cpsl-qr-code.tsx","src/components/cpsl-radio/cpsl-radio.scss?tag=cpsl-radio&encapsulation=shadow","src/components/cpsl-radio/cpsl-radio.tsx","src/components/cpsl-select/cpsl-select.scss?tag=cpsl-select&encapsulation=shadow","src/components/cpsl-select/cpsl-select.tsx","src/components/cpsl-select-item/cpsl-select-item.scss?tag=cpsl-select-item&encapsulation=shadow","src/components/cpsl-select-item/cpsl-select-item.tsx","src/components/cpsl-slide-button/cpsl-slide-button.scss?tag=cpsl-slide-button&encapsulation=shadow","src/components/cpsl-slide-button/cpsl-slide-button.tsx","src/components/cpsl-spinner/cpsl-spinner.scss?tag=cpsl-spinner&encapsulation=shadow","src/components/cpsl-spinner/cpsl-spinner.tsx","src/components/cpsl-switch/cpsl-switch.scss?tag=cpsl-switch&encapsulation=shadow","src/components/cpsl-switch/cpsl-switch.tsx","src/components/cpsl-tab/cpsl-tab.scss?tag=cpsl-tab&encapsulation=shadow","src/components/cpsl-tab/cpsl-tab.tsx","src/components/cpsl-table/cpsl-table.scss?tag=cpsl-table&encapsulation=shadow","src/components/cpsl-table/cpsl-table.tsx","src/components/cpsl-tabs/cpsl-tabs.scss?tag=cpsl-tabs&encapsulation=shadow","src/components/cpsl-tabs/cpsl-tabs.tsx","src/components/cpsl-text/cpsl-text.scss?tag=cpsl-text&encapsulation=shadow","src/components/cpsl-text/cpsl-text.tsx","src/components/cpsl-tile-button/cpsl-tile-button.scss?tag=cpsl-tile-button&encapsulation=shadow","src/components/cpsl-tile-button/cpsl-tile-button.tsx"],"sourcesContent":["@import '../../themes/capsule.globals';\n\n:host {\n --container-gap: 8px;\n\n --container-padding-top: 14px;\n --container-padding-bottom: 14px;\n --container-padding-start: 16px;\n --container-padding-end: 16px;\n\n --container-font-size: var(--cpsl-font-size-body-m);\n\n --container-border-width: 1px;\n --container-border-radius: var(--cpsl-border-radius-alert);\n\n --container-background-color: var(--cpsl-color-background-0);\n --container-color: var(--cpsl-color-text-primary);\n --container-icon-color: var(--container-color);\n\n display: inline-block;\n font-family: $font-family-base;\n}\n\n:host(.error) {\n --container-border-color: var(--cpsl-color-utility-red);\n}\n\n:host(.warning) {\n --container-border-color: var(--cpsl-color-utility-yellow);\n}\n\n:host(.success) {\n --container-border-color: var(--cpsl-color-utility-green);\n}\n\n:host {\n cpsl-icon {\n --icon-color: var(--container-icon-color);\n --height: 20px;\n --width: 20px;\n }\n}\n\n.alert-container {\n @include border-radius(var(--container-border-radius));\n @include padding(var(--container-padding-top), var(--container-padding-end), var(--container-padding-bottom), var(--container-padding-start));\n\n font-size: var(--container-font-size);\n\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--container-gap);\n\n border-style: solid;\n border-width: var(--container-border-width);\n border-color: var(--container-border-color);\n\n background-color: var(--container-background-color);\n color: var(--container-color);\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-alert',\n styleUrl: 'cpsl-alert.scss',\n shadow: true,\n})\nexport class CpslAlert {\n /**\n * The name of the icon to show.\n */\n @Prop() icon?: IconType;\n\n /**\n * The variant of alert.\n * Options are: `\"error\"` | `\"warning\"` | `\"success\"` | `\"custom\"`\n * Default is: `\"error\"`.\n */\n @Prop() variant?: 'error' | 'warning' | 'success' | 'custom' = 'error';\n\n private get iconType(): IconType | undefined {\n if (this.icon) {\n this.icon;\n }\n\n switch (this.variant) {\n case 'custom': {\n return undefined;\n }\n case 'success': {\n return 'checkCircle';\n }\n case 'warning': {\n return 'alertCircle';\n }\n case 'error':\n default: {\n return 'alertCircle';\n }\n }\n }\n\n render() {\n return (\n <Host class={{ error: this.variant === 'error', warning: this.variant === 'warning', success: this.variant === 'success' }}>\n <div class=\"alert-container\">\n {this.iconType && <cpsl-icon icon={this.iconType} />}\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n","@use 'sass:map';\n@import '../../themes/capsule.globals';\n\n:host {\n display: block;\n\n position: relative;\n top: 0;\n width: 100%;\n z-index: map.get($z-indices, 'app-bar');\n}\n\n.container {\n display: flex;\n width: 100%;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-app-bar',\n styleUrl: 'cpsl-app-bar.scss',\n shadow: true,\n})\nexport class CpslAppBar {\n /**\n * Height of the app bar.\n */\n @Prop() height: number;\n\n /**\n * The position of the drawer.\n * Default is `fixed`.\n */\n @Prop() position?: 'fixed' | 'static' = 'fixed';\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n render() {\n return (\n <Host\n style={{\n // position: this.position,\n height: `${this.height}px`,\n ...(this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}),\n }}\n >\n <div\n class=\"container\"\n part=\"container\"\n style={{\n position: this.position,\n height: `${this.height}px`,\n }}\n >\n <slot></slot>\n </div>\n {this.position === 'fixed' && (\n <div\n style={{\n height: `${this.height}px`,\n }}\n />\n )}\n </Host>\n );\n }\n}\n","function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/*!\n * GSAP 3.12.5\n * https://gsap.com\n *\n * @license Copyright 2008-2024, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license or for\n * Club GSAP members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar _config = {\n autoSleep: 120,\n force3D: \"auto\",\n nullTargetWarn: 1,\n units: {\n lineHeight: \"\"\n }\n},\n _defaults = {\n duration: .5,\n overwrite: false,\n delay: 0\n},\n _suppressOverwrites,\n _reverting,\n _context,\n _bigNum = 1e8,\n _tinyNum = 1 / _bigNum,\n _2PI = Math.PI * 2,\n _HALF_PI = _2PI / 4,\n _gsID = 0,\n _sqrt = Math.sqrt,\n _cos = Math.cos,\n _sin = Math.sin,\n _isString = function _isString(value) {\n return typeof value === \"string\";\n},\n _isFunction = function _isFunction(value) {\n return typeof value === \"function\";\n},\n _isNumber = function _isNumber(value) {\n return typeof value === \"number\";\n},\n _isUndefined = function _isUndefined(value) {\n return typeof value === \"undefined\";\n},\n _isObject = function _isObject(value) {\n return typeof value === \"object\";\n},\n _isNotFalse = function _isNotFalse(value) {\n return value !== false;\n},\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _isFuncOrString = function _isFuncOrString(value) {\n return _isFunction(value) || _isString(value);\n},\n _isTypedArray = typeof ArrayBuffer === \"function\" && ArrayBuffer.isView || function () {},\n // note: IE10 has ArrayBuffer, but NOT ArrayBuffer.isView().\n_isArray = Array.isArray,\n _strictNumExp = /(?:-?\\.?\\d|\\.)+/gi,\n //only numbers (including negatives and decimals) but NOT relative values.\n_numExp = /[-+=.]*\\d+[.e\\-+]*\\d*[e\\-+]*\\d*/g,\n //finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8.\n_numWithUnitExp = /[-+=.]*\\d+[.e-]*\\d*[a-z%]*/g,\n _complexStringNumExp = /[-+=.]*\\d+\\.?\\d*(?:e-|e\\+)?\\d*/gi,\n //duplicate so that while we're looping through matches from exec(), it doesn't contaminate the lastIndex of _numExp which we use to search for colors too.\n_relExp = /[+-]=-?[.\\d]+/,\n _delimitedValueExp = /[^,'\"\\[\\]\\s]+/gi,\n // previously /[#\\-+.]*\\b[a-z\\d\\-=+%.]+/gi but didn't catch special characters.\n_unitExp = /^[+\\-=e\\s\\d]*\\d+[.\\d]*([a-z]*|%)\\s*$/i,\n _globalTimeline,\n _win,\n _coreInitted,\n _doc,\n _globals = {},\n _installScope = {},\n _coreReady,\n _install = function _install(scope) {\n return (_installScope = _merge(scope, _globals)) && gsap;\n},\n _missingPlugin = function _missingPlugin(property, value) {\n return console.warn(\"Invalid property\", property, \"set to\", value, \"Missing plugin? gsap.registerPlugin()\");\n},\n _warn = function _warn(message, suppress) {\n return !suppress && console.warn(message);\n},\n _addGlobal = function _addGlobal(name, obj) {\n return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals;\n},\n _emptyFunc = function _emptyFunc() {\n return 0;\n},\n _startAtRevertConfig = {\n suppressEvents: true,\n isStart: true,\n kill: false\n},\n _revertConfigNoKill = {\n suppressEvents: true,\n kill: false\n},\n _revertConfig = {\n suppressEvents: true\n},\n _reservedProps = {},\n _lazyTweens = [],\n _lazyLookup = {},\n _lastRenderedFrame,\n _plugins = {},\n _effects = {},\n _nextGCFrame = 30,\n _harnessPlugins = [],\n _callbackNames = \"\",\n _harness = function _harness(targets) {\n var target = targets[0],\n harnessPlugin,\n i;\n _isObject(target) || _isFunction(target) || (targets = [targets]);\n\n if (!(harnessPlugin = (target._gsap || {}).harness)) {\n // find the first target with a harness. We assume targets passed into an animation will be of similar type, meaning the same kind of harness can be used for them all (performance optimization)\n i = _harnessPlugins.length;\n\n while (i-- && !_harnessPlugins[i].targetTest(target)) {}\n\n harnessPlugin = _harnessPlugins[i];\n }\n\n i = targets.length;\n\n while (i--) {\n targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1);\n }\n\n return targets;\n},\n _getCache = function _getCache(target) {\n return target._gsap || _harness(toArray(target))[0]._gsap;\n},\n _getProperty = function _getProperty(target, property, v) {\n return (v = target[property]) && _isFunction(v) ? target[property]() : _isUndefined(v) && target.getAttribute && target.getAttribute(property) || v;\n},\n _forEachName = function _forEachName(names, func) {\n return (names = names.split(\",\")).forEach(func) || names;\n},\n //split a comma-delimited list of names into an array, then run a forEach() function and return the split array (this is just a way to consolidate/shorten some code).\n_round = function _round(value) {\n return Math.round(value * 100000) / 100000 || 0;\n},\n _roundPrecise = function _roundPrecise(value) {\n return Math.round(value * 10000000) / 10000000 || 0;\n},\n // increased precision mostly for timing values.\n_parseRelative = function _parseRelative(start, value) {\n var operator = value.charAt(0),\n end = parseFloat(value.substr(2));\n start = parseFloat(start);\n return operator === \"+\" ? start + end : operator === \"-\" ? start - end : operator === \"*\" ? start * end : start / end;\n},\n _arrayContainsAny = function _arrayContainsAny(toSearch, toFind) {\n //searches one array to find matches for any of the items in the toFind array. As soon as one is found, it returns true. It does NOT return all the matches; it's simply a boolean search.\n var l = toFind.length,\n i = 0;\n\n for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l;) {}\n\n return i < l;\n},\n _lazyRender = function _lazyRender() {\n var l = _lazyTweens.length,\n a = _lazyTweens.slice(0),\n i,\n tween;\n\n _lazyLookup = {};\n _lazyTweens.length = 0;\n\n for (i = 0; i < l; i++) {\n tween = a[i];\n tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);\n }\n},\n _lazySafeRender = function _lazySafeRender(animation, time, suppressEvents, force) {\n _lazyTweens.length && !_reverting && _lazyRender();\n animation.render(time, suppressEvents, force || _reverting && time < 0 && (animation._initted || animation._startAt));\n _lazyTweens.length && !_reverting && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.\n},\n _numericIfPossible = function _numericIfPossible(value) {\n var n = parseFloat(value);\n return (n || n === 0) && (value + \"\").match(_delimitedValueExp).length < 2 ? n : _isString(value) ? value.trim() : value;\n},\n _passThrough = function _passThrough(p) {\n return p;\n},\n _setDefaults = function _setDefaults(obj, defaults) {\n for (var p in defaults) {\n p in obj || (obj[p] = defaults[p]);\n }\n\n return obj;\n},\n _setKeyframeDefaults = function _setKeyframeDefaults(excludeDuration) {\n return function (obj, defaults) {\n for (var p in defaults) {\n p in obj || p === \"duration\" && excludeDuration || p === \"ease\" || (obj[p] = defaults[p]);\n }\n };\n},\n _merge = function _merge(base, toMerge) {\n for (var p in toMerge) {\n base[p] = toMerge[p];\n }\n\n return base;\n},\n _mergeDeep = function _mergeDeep(base, toMerge) {\n for (var p in toMerge) {\n p !== \"__proto__\" && p !== \"constructor\" && p !== \"prototype\" && (base[p] = _isObject(toMerge[p]) ? _mergeDeep(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p]);\n }\n\n return base;\n},\n _copyExcluding = function _copyExcluding(obj, excluding) {\n var copy = {},\n p;\n\n for (p in obj) {\n p in excluding || (copy[p] = obj[p]);\n }\n\n return copy;\n},\n _inheritDefaults = function _inheritDefaults(vars) {\n var parent = vars.parent || _globalTimeline,\n func = vars.keyframes ? _setKeyframeDefaults(_isArray(vars.keyframes)) : _setDefaults;\n\n if (_isNotFalse(vars.inherit)) {\n while (parent) {\n func(vars, parent.vars.defaults);\n parent = parent.parent || parent._dp;\n }\n }\n\n return vars;\n},\n _arraysMatch = function _arraysMatch(a1, a2) {\n var i = a1.length,\n match = i === a2.length;\n\n while (match && i-- && a1[i] === a2[i]) {}\n\n return i < 0;\n},\n _addLinkedListItem = function _addLinkedListItem(parent, child, firstProp, lastProp, sortBy) {\n if (firstProp === void 0) {\n firstProp = \"_first\";\n }\n\n if (lastProp === void 0) {\n lastProp = \"_last\";\n }\n\n var prev = parent[lastProp],\n t;\n\n if (sortBy) {\n t = child[sortBy];\n\n while (prev && prev[sortBy] > t) {\n prev = prev._prev;\n }\n }\n\n if (prev) {\n child._next = prev._next;\n prev._next = child;\n } else {\n child._next = parent[firstProp];\n parent[firstProp] = child;\n }\n\n if (child._next) {\n child._next._prev = child;\n } else {\n parent[lastProp] = child;\n }\n\n child._prev = prev;\n child.parent = child._dp = parent;\n return child;\n},\n _removeLinkedListItem = function _removeLinkedListItem(parent, child, firstProp, lastProp) {\n if (firstProp === void 0) {\n firstProp = \"_first\";\n }\n\n if (lastProp === void 0) {\n lastProp = \"_last\";\n }\n\n var prev = child._prev,\n next = child._next;\n\n if (prev) {\n prev._next = next;\n } else if (parent[firstProp] === child) {\n parent[firstProp] = next;\n }\n\n if (next) {\n next._prev = prev;\n } else if (parent[lastProp] === child) {\n parent[lastProp] = prev;\n }\n\n child._next = child._prev = child.parent = null; // don't delete the _dp just so we can revert if necessary. But parent should be null to indicate the item isn't in a linked list.\n},\n _removeFromParent = function _removeFromParent(child, onlyIfParentHasAutoRemove) {\n child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove && child.parent.remove(child);\n child._act = 0;\n},\n _uncache = function _uncache(animation, child) {\n if (animation && (!child || child._end > animation._dur || child._start < 0)) {\n // performance optimization: if a child animation is passed in we should only uncache if that child EXTENDS the animation (its end time is beyond the end)\n var a = animation;\n\n while (a) {\n a._dirty = 1;\n a = a.parent;\n }\n }\n\n return animation;\n},\n _recacheAncestors = function _recacheAncestors(animation) {\n var parent = animation.parent;\n\n while (parent && parent.parent) {\n //sometimes we must force a re-sort of all children and update the duration/totalDuration of all ancestor timelines immediately in case, for example, in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.\n parent._dirty = 1;\n parent.totalDuration();\n parent = parent.parent;\n }\n\n return animation;\n},\n _rewindStartAt = function _rewindStartAt(tween, totalTime, suppressEvents, force) {\n return tween._startAt && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween.vars.immediateRender && !tween.vars.autoRevert || tween._startAt.render(totalTime, true, force));\n},\n _hasNoPausedAncestors = function _hasNoPausedAncestors(animation) {\n return !animation || animation._ts && _hasNoPausedAncestors(animation.parent);\n},\n _elapsedCycleDuration = function _elapsedCycleDuration(animation) {\n return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;\n},\n // feed in the totalTime and cycleDuration and it'll return the cycle (iteration minus 1) and if the playhead is exactly at the very END, it will NOT bump up to the next cycle.\n_animationCycle = function _animationCycle(tTime, cycleDuration) {\n var whole = Math.floor(tTime /= cycleDuration);\n return tTime && whole === tTime ? whole - 1 : whole;\n},\n _parentToChildTotalTime = function _parentToChildTotalTime(parentTime, child) {\n return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);\n},\n _setEnd = function _setEnd(animation) {\n return animation._end = _roundPrecise(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0));\n},\n _alignPlayhead = function _alignPlayhead(animation, totalTime) {\n // adjusts the animation's _start and _end according to the provided totalTime (only if the parent's smoothChildTiming is true and the animation isn't paused). It doesn't do any rendering or forcing things back into parent timelines, etc. - that's what totalTime() is for.\n var parent = animation._dp;\n\n if (parent && parent.smoothChildTiming && animation._ts) {\n animation._start = _roundPrecise(parent._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts));\n\n _setEnd(animation);\n\n parent._dirty || _uncache(parent, animation); //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.\n }\n\n return animation;\n},\n\n/*\n_totalTimeToTime = (clampedTotalTime, duration, repeat, repeatDelay, yoyo) => {\n\tlet cycleDuration = duration + repeatDelay,\n\t\ttime = _round(clampedTotalTime % cycleDuration);\n\tif (time > duration) {\n\t\ttime = duration;\n\t}\n\treturn (yoyo && (~~(clampedTotalTime / cycleDuration) & 1)) ? duration - time : time;\n},\n*/\n_postAddChecks = function _postAddChecks(timeline, child) {\n var t;\n\n if (child._time || !child._dur && child._initted || child._start < timeline._time && (child._dur || !child.add)) {\n // in case, for example, the _start is moved on a tween that has already rendered, or if it's being inserted into a timeline BEFORE where the playhead is currently. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. Special case: if it's a timeline (has .add() method) and no duration, we can skip rendering because the user may be populating it AFTER adding it to a parent timeline (unconventional, but possible, and we wouldn't want it to get removed if the parent's autoRemoveChildren is true).\n t = _parentToChildTotalTime(timeline.rawTime(), child);\n\n if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) {\n child.render(t, true);\n }\n } //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.\n\n\n if (_uncache(timeline, child)._dp && timeline._initted && timeline._time >= timeline._dur && timeline._ts) {\n //in case any of the ancestors had completed but should now be enabled...\n if (timeline._dur < timeline.duration()) {\n t = timeline;\n\n while (t._dp) {\n t.rawTime() >= 0 && t.totalTime(t._tTime); //moves the timeline (shifts its startTime) if necessary, and also enables it. If it's currently zero, though, it may not be scheduled to render until later so there's no need to force it to align with the current playhead position. Only move to catch up with the playhead.\n\n t = t._dp;\n }\n }\n\n timeline._zTime = -_tinyNum; // helps ensure that the next render() will be forced (crossingStart = true in render()), even if the duration hasn't changed (we're adding a child which would need to get rendered). Definitely an edge case. Note: we MUST do this AFTER the loop above where the totalTime() might trigger a render() because this _addToTimeline() method gets called from the Animation constructor, BEFORE tweens even record their targets, etc. so we wouldn't want things to get triggered in the wrong order.\n }\n},\n _addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) {\n child.parent && _removeFromParent(child);\n child._start = _roundPrecise((_isNumber(position) ? position : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay);\n child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));\n\n _addLinkedListItem(timeline, child, \"_first\", \"_last\", timeline._sort ? \"_start\" : 0);\n\n _isFromOrFromStart(child) || (timeline._recent = child);\n skipChecks || _postAddChecks(timeline, child);\n timeline._ts < 0 && _alignPlayhead(timeline, timeline._tTime); // if the timeline is reversed and the new child makes it longer, we may need to adjust the parent's _start (push it back)\n\n return timeline;\n},\n _scrollTrigger = function _scrollTrigger(animation, trigger) {\n return (_globals.ScrollTrigger || _missingPlugin(\"scrollTrigger\", trigger)) && _globals.ScrollTrigger.create(trigger, animation);\n},\n _attemptInitTween = function _attemptInitTween(tween, time, force, suppressEvents, tTime) {\n _initTween(tween, time, tTime);\n\n if (!tween._initted) {\n return 1;\n }\n\n if (!force && tween._pt && !_reverting && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) {\n _lazyTweens.push(tween);\n\n tween._lazy = [tTime, suppressEvents];\n return 1;\n }\n},\n _parentPlayheadIsBeforeStart = function _parentPlayheadIsBeforeStart(_ref) {\n var parent = _ref.parent;\n return parent && parent._ts && parent._initted && !parent._lock && (parent.rawTime() < 0 || _parentPlayheadIsBeforeStart(parent));\n},\n // check parent's _lock because when a timeline repeats/yoyos and does its artificial wrapping, we shouldn't force the ratio back to 0\n_isFromOrFromStart = function _isFromOrFromStart(_ref2) {\n var data = _ref2.data;\n return data === \"isFromStart\" || data === \"isStart\";\n},\n _renderZeroDurationTween = function _renderZeroDurationTween(tween, totalTime, suppressEvents, force) {\n var prevRatio = tween.ratio,\n ratio = totalTime < 0 || !totalTime && (!tween._start && _parentPlayheadIsBeforeStart(tween) && !(!tween._initted && _isFromOrFromStart(tween)) || (tween._ts < 0 || tween._dp._ts < 0) && !_isFromOrFromStart(tween)) ? 0 : 1,\n // if the tween or its parent is reversed and the totalTime is 0, we should go to a ratio of 0. Edge case: if a from() or fromTo() stagger tween is placed later in a timeline, the \"startAt\" zero-duration tween could initially render at a time when the parent timeline's playhead is technically BEFORE where this tween is, so make sure that any \"from\" and \"fromTo\" startAt tweens are rendered the first time at a ratio of 1.\n repeatDelay = tween._rDelay,\n tTime = 0,\n pt,\n iteration,\n prevIteration;\n\n if (repeatDelay && tween._repeat) {\n // in case there's a zero-duration tween that has a repeat with a repeatDelay\n tTime = _clamp(0, tween._tDur, totalTime);\n iteration = _animationCycle(tTime, repeatDelay);\n tween._yoyo && iteration & 1 && (ratio = 1 - ratio);\n\n if (iteration !== _animationCycle(tween._tTime, repeatDelay)) {\n // if iteration changed\n prevRatio = 1 - ratio;\n tween.vars.repeatRefresh && tween._initted && tween.invalidate();\n }\n }\n\n if (ratio !== prevRatio || _reverting || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) {\n if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents, tTime)) {\n // if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.\n return;\n }\n\n prevIteration = tween._zTime;\n tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0); // when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.\n\n suppressEvents || (suppressEvents = totalTime && !prevIteration); // if it was rendered previously at exactly 0 (_zTime) and now the playhead is moving away, DON'T fire callbacks otherwise they'll seem like duplicates.\n\n tween.ratio = ratio;\n tween._from && (ratio = 1 - ratio);\n tween._time = 0;\n tween._tTime = tTime;\n pt = tween._pt;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n\n totalTime < 0 && _rewindStartAt(tween, totalTime, suppressEvents, true);\n tween._onUpdate && !suppressEvents && _callback(tween, \"onUpdate\");\n tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, \"onRepeat\");\n\n if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) {\n ratio && _removeFromParent(tween, 1);\n\n if (!suppressEvents && !_reverting) {\n _callback(tween, ratio ? \"onComplete\" : \"onReverseComplete\", true);\n\n tween._prom && tween._prom();\n }\n }\n } else if (!tween._zTime) {\n tween._zTime = totalTime;\n }\n},\n _findNextPauseTween = function _findNextPauseTween(animation, prevTime, time) {\n var child;\n\n if (time > prevTime) {\n child = animation._first;\n\n while (child && child._start <= time) {\n if (child.data === \"isPause\" && child._start > prevTime) {\n return child;\n }\n\n child = child._next;\n }\n } else {\n child = animation._last;\n\n while (child && child._start >= time) {\n if (child.data === \"isPause\" && child._start < prevTime) {\n return child;\n }\n\n child = child._prev;\n }\n }\n},\n _setDuration = function _setDuration(animation, duration, skipUncache, leavePlayhead) {\n var repeat = animation._repeat,\n dur = _roundPrecise(duration) || 0,\n totalProgress = animation._tTime / animation._tDur;\n totalProgress && !leavePlayhead && (animation._time *= dur / animation._dur);\n animation._dur = dur;\n animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _roundPrecise(dur * (repeat + 1) + animation._rDelay * repeat);\n totalProgress > 0 && !leavePlayhead && _alignPlayhead(animation, animation._tTime = animation._tDur * totalProgress);\n animation.parent && _setEnd(animation);\n skipUncache || _uncache(animation.parent, animation);\n return animation;\n},\n _onUpdateTotalDuration = function _onUpdateTotalDuration(animation) {\n return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur);\n},\n _zeroPosition = {\n _start: 0,\n endTime: _emptyFunc,\n totalDuration: _emptyFunc\n},\n _parsePosition = function _parsePosition(animation, position, percentAnimation) {\n var labels = animation.labels,\n recent = animation._recent || _zeroPosition,\n clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur,\n //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.\n i,\n offset,\n isPercent;\n\n if (_isString(position) && (isNaN(position) || position in labels)) {\n //if the string is a number like \"1\", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).\n offset = position.charAt(0);\n isPercent = position.substr(-1) === \"%\";\n i = position.indexOf(\"=\");\n\n if (offset === \"<\" || offset === \">\") {\n i >= 0 && (position = position.replace(/=/, \"\"));\n return (offset === \"<\" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0) * (isPercent ? (i < 0 ? recent : percentAnimation).totalDuration() / 100 : 1);\n }\n\n if (i < 0) {\n position in labels || (labels[position] = clippedDuration);\n return labels[position];\n }\n\n offset = parseFloat(position.charAt(i - 1) + position.substr(i + 1));\n\n if (isPercent && percentAnimation) {\n offset = offset / 100 * (_isArray(percentAnimation) ? percentAnimation[0] : percentAnimation).totalDuration();\n }\n\n return i > 1 ? _parsePosition(animation, position.substr(0, i - 1), percentAnimation) + offset : clippedDuration + offset;\n }\n\n return position == null ? clippedDuration : +position;\n},\n _createTweenType = function _createTweenType(type, params, timeline) {\n var isLegacy = _isNumber(params[1]),\n varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1),\n vars = params[varsIndex],\n irVars,\n parent;\n\n isLegacy && (vars.duration = params[1]);\n vars.parent = timeline;\n\n if (type) {\n irVars = vars;\n parent = timeline;\n\n while (parent && !(\"immediateRender\" in irVars)) {\n // inheritance hasn't happened yet, but someone may have set a default in an ancestor timeline. We could do vars.immediateRender = _isNotFalse(_inheritDefaults(vars).immediateRender) but that'd exact a slight performance penalty because _inheritDefaults() also runs in the Tween constructor. We're paying a small kb price here to gain speed.\n irVars = parent.vars.defaults || {};\n parent = _isNotFalse(parent.vars.inherit) && parent.parent;\n }\n\n vars.immediateRender = _isNotFalse(irVars.immediateRender);\n type < 2 ? vars.runBackwards = 1 : vars.startAt = params[varsIndex - 1]; // \"from\" vars\n }\n\n return new Tween(params[0], vars, params[varsIndex + 1]);\n},\n _conditionalReturn = function _conditionalReturn(value, func) {\n return value || value === 0 ? func(value) : func;\n},\n _clamp = function _clamp(min, max, value) {\n return value < min ? min : value > max ? max : value;\n},\n getUnit = function getUnit(value, v) {\n return !_isString(value) || !(v = _unitExp.exec(value)) ? \"\" : v[1];\n},\n // note: protect against padded numbers as strings, like \"100.100\". That shouldn't return \"00\" as the unit. If it's numeric, return no unit.\nclamp = function clamp(min, max, value) {\n return _conditionalReturn(value, function (v) {\n return _clamp(min, max, v);\n });\n},\n _slice = [].slice,\n _isArrayLike = function _isArrayLike(value, nonEmpty) {\n return value && _isObject(value) && \"length\" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win;\n},\n _flatten = function _flatten(ar, leaveStrings, accumulator) {\n if (accumulator === void 0) {\n accumulator = [];\n }\n\n return ar.forEach(function (value) {\n var _accumulator;\n\n return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value);\n }) || accumulator;\n},\n //takes any value and returns an array. If it's a string (and leaveStrings isn't true), it'll use document.querySelectorAll() and convert that to an array. It'll also accept iterables like jQuery objects.\ntoArray = function toArray(value, scope, leaveStrings) {\n return _context && !scope && _context.selector ? _context.selector(value) : _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call((scope || _doc).querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : [];\n},\n selector = function selector(value) {\n value = toArray(value)[0] || _warn(\"Invalid scope\") || {};\n return function (v) {\n var el = value.current || value.nativeElement || value;\n return toArray(v, el.querySelectorAll ? el : el === value ? _warn(\"Invalid scope\") || _doc.createElement(\"div\") : value);\n };\n},\n shuffle = function shuffle(a) {\n return a.sort(function () {\n return .5 - Math.random();\n });\n},\n // alternative that's a bit faster and more reliably diverse but bigger: for (let j, v, i = a.length; i; j = Math.floor(Math.random() * i), v = a[--i], a[i] = a[j], a[j] = v); return a;\n//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following\ndistribute = function distribute(v) {\n if (_isFunction(v)) {\n return v;\n }\n\n var vars = _isObject(v) ? v : {\n each: v\n },\n //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total \"amount\" that's chunked out among them all.\n ease = _parseEase(vars.ease),\n from = vars.from || 0,\n base = parseFloat(vars.base) || 0,\n cache = {},\n isDecimal = from > 0 && from < 1,\n ratios = isNaN(from) || isDecimal,\n axis = vars.axis,\n ratioX = from,\n ratioY = from;\n\n if (_isString(from)) {\n ratioX = ratioY = {\n center: .5,\n edges: .5,\n end: 1\n }[from] || 0;\n } else if (!isDecimal && ratios) {\n ratioX = from[0];\n ratioY = from[1];\n }\n\n return function (i, target, a) {\n var l = (a || vars).length,\n distances = cache[l],\n originX,\n originY,\n x,\n y,\n d,\n j,\n max,\n min,\n wrapAt;\n\n if (!distances) {\n wrapAt = vars.grid === \"auto\" ? 0 : (vars.grid || [1, _bigNum])[1];\n\n if (!wrapAt) {\n max = -_bigNum;\n\n while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {}\n\n wrapAt < l && wrapAt--;\n }\n\n distances = cache[l] = [];\n originX = ratios ? Math.min(wrapAt, l) * ratioX - .5 : from % wrapAt;\n originY = wrapAt === _bigNum ? 0 : ratios ? l * ratioY / wrapAt - .5 : from / wrapAt | 0;\n max = 0;\n min = _bigNum;\n\n for (j = 0; j < l; j++) {\n x = j % wrapAt - originX;\n y = originY - (j / wrapAt | 0);\n distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === \"y\" ? y : x);\n d > max && (max = d);\n d < min && (min = d);\n }\n\n from === \"random\" && shuffle(distances);\n distances.max = max - min;\n distances.min = min;\n distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === \"y\" ? l / wrapAt : wrapAt) || 0) * (from === \"edges\" ? -1 : 1);\n distances.b = l < 0 ? base - l : base;\n distances.u = getUnit(vars.amount || vars.each) || 0; //unit\n\n ease = ease && l < 0 ? _invertEase(ease) : ease;\n }\n\n l = (distances[i] - distances.min) / distances.max || 0;\n return _roundPrecise(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u; //round in order to work around floating point errors\n };\n},\n _roundModifier = function _roundModifier(v) {\n //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc.\n var p = Math.pow(10, ((v + \"\").split(\".\")[1] || \"\").length); //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed())\n\n return function (raw) {\n var n = _roundPrecise(Math.round(parseFloat(raw) / v) * v * p);\n\n return (n - n % 1) / p + (_isNumber(raw) ? 0 : getUnit(raw)); // n - n % 1 replaces Math.floor() in order to handle negative values properly. For example, Math.floor(-150.00000000000003) is 151!\n };\n},\n snap = function snap(snapTo, value) {\n var isArray = _isArray(snapTo),\n radius,\n is2D;\n\n if (!isArray && _isObject(snapTo)) {\n radius = isArray = snapTo.radius || _bigNum;\n\n if (snapTo.values) {\n snapTo = toArray(snapTo.values);\n\n if (is2D = !_isNumber(snapTo[0])) {\n radius *= radius; //performance optimization so we don't have to Math.sqrt() in the loop.\n }\n } else {\n snapTo = _roundModifier(snapTo.increment);\n }\n }\n\n return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : _isFunction(snapTo) ? function (raw) {\n is2D = snapTo(raw);\n return Math.abs(is2D - raw) <= radius ? is2D : raw;\n } : function (raw) {\n var x = parseFloat(is2D ? raw.x : raw),\n y = parseFloat(is2D ? raw.y : 0),\n min = _bigNum,\n closest = 0,\n i = snapTo.length,\n dx,\n dy;\n\n while (i--) {\n if (is2D) {\n dx = snapTo[i].x - x;\n dy = snapTo[i].y - y;\n dx = dx * dx + dy * dy;\n } else {\n dx = Math.abs(snapTo[i] - x);\n }\n\n if (dx < min) {\n min = dx;\n closest = i;\n }\n }\n\n closest = !radius || min <= radius ? snapTo[closest] : raw;\n return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw);\n });\n},\n random = function random(min, max, roundingIncrement, returnFunction) {\n return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function () {\n return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + \"\").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * .99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction;\n });\n},\n pipe = function pipe() {\n for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {\n functions[_key] = arguments[_key];\n }\n\n return function (value) {\n return functions.reduce(function (v, f) {\n return f(v);\n }, value);\n };\n},\n unitize = function unitize(func, unit) {\n return function (value) {\n return func(parseFloat(value)) + (unit || getUnit(value));\n };\n},\n normalize = function normalize(min, max, value) {\n return mapRange(min, max, 0, 1, value);\n},\n _wrapArray = function _wrapArray(a, wrapper, value) {\n return _conditionalReturn(value, function (index) {\n return a[~~wrapper(index)];\n });\n},\n wrap = function wrap(min, max, value) {\n // NOTE: wrap() CANNOT be an arrow function! A very odd compiling bug causes problems (unrelated to GSAP).\n var range = max - min;\n return _isArray(min) ? _wrapArray(min, wrap(0, min.length), max) : _conditionalReturn(value, function (value) {\n return (range + (value - min) % range) % range + min;\n });\n},\n wrapYoyo = function wrapYoyo(min, max, value) {\n var range = max - min,\n total = range * 2;\n return _isArray(min) ? _wrapArray(min, wrapYoyo(0, min.length - 1), max) : _conditionalReturn(value, function (value) {\n value = (total + (value - min) % total) % total || 0;\n return min + (value > range ? total - value : value);\n });\n},\n _replaceRandom = function _replaceRandom(value) {\n //replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500])\n var prev = 0,\n s = \"\",\n i,\n nums,\n end,\n isArray;\n\n while (~(i = value.indexOf(\"random(\", prev))) {\n end = value.indexOf(\")\", i);\n isArray = value.charAt(i + 7) === \"[\";\n nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp);\n s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], isArray ? 0 : +nums[1], +nums[2] || 1e-5);\n prev = end + 1;\n }\n\n return s + value.substr(prev, value.length - prev);\n},\n mapRange = function mapRange(inMin, inMax, outMin, outMax, value) {\n var inRange = inMax - inMin,\n outRange = outMax - outMin;\n return _conditionalReturn(value, function (value) {\n return outMin + ((value - inMin) / inRange * outRange || 0);\n });\n},\n interpolate = function interpolate(start, end, progress, mutate) {\n var func = isNaN(start + end) ? 0 : function (p) {\n return (1 - p) * start + p * end;\n };\n\n if (!func) {\n var isString = _isString(start),\n master = {},\n p,\n i,\n interpolators,\n l,\n il;\n\n progress === true && (mutate = 1) && (progress = null);\n\n if (isString) {\n start = {\n p: start\n };\n end = {\n p: end\n };\n } else if (_isArray(start) && !_isArray(end)) {\n interpolators = [];\n l = start.length;\n il = l - 2;\n\n for (i = 1; i < l; i++) {\n interpolators.push(interpolate(start[i - 1], start[i])); //build the interpolators up front as a performance optimization so that when the function is called many times, it can just reuse them.\n }\n\n l--;\n\n func = function func(p) {\n p *= l;\n var i = Math.min(il, ~~p);\n return interpolators[i](p - i);\n };\n\n progress = end;\n } else if (!mutate) {\n start = _merge(_isArray(start) ? [] : {}, start);\n }\n\n if (!interpolators) {\n for (p in end) {\n _addPropTween.call(master, start, p, \"get\", end[p]);\n }\n\n func = function func(p) {\n return _renderPropTweens(p, master) || (isString ? start.p : start);\n };\n }\n }\n\n return _conditionalReturn(progress, func);\n},\n _getLabelInDirection = function _getLabelInDirection(timeline, fromTime, backward) {\n //used for nextLabel() and previousLabel()\n var labels = timeline.labels,\n min = _bigNum,\n p,\n distance,\n label;\n\n for (p in labels) {\n distance = labels[p] - fromTime;\n\n if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) {\n label = p;\n min = distance;\n }\n }\n\n return label;\n},\n _callback = function _callback(animation, type, executeLazyFirst) {\n var v = animation.vars,\n callback = v[type],\n prevContext = _context,\n context = animation._ctx,\n params,\n scope,\n result;\n\n if (!callback) {\n return;\n }\n\n params = v[type + \"Params\"];\n scope = v.callbackScope || animation;\n executeLazyFirst && _lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.\n\n context && (_context = context);\n result = params ? callback.apply(scope, params) : callback.call(scope);\n _context = prevContext;\n return result;\n},\n _interrupt = function _interrupt(animation) {\n _removeFromParent(animation);\n\n animation.scrollTrigger && animation.scrollTrigger.kill(!!_reverting);\n animation.progress() < 1 && _callback(animation, \"onInterrupt\");\n return animation;\n},\n _quickTween,\n _registerPluginQueue = [],\n _createPlugin = function _createPlugin(config) {\n if (!config) return;\n config = !config.name && config[\"default\"] || config; // UMD packaging wraps things oddly, so for example MotionPathHelper becomes {MotionPathHelper:MotionPathHelper, default:MotionPathHelper}.\n\n if (_windowExists() || config.headless) {\n // edge case: some build tools may pass in a null/undefined value\n var name = config.name,\n isFunc = _isFunction(config),\n Plugin = name && !isFunc && config.init ? function () {\n this._props = [];\n } : config,\n //in case someone passes in an object that's not a plugin, like CustomEase\n instanceDefaults = {\n init: _emptyFunc,\n render: _renderPropTweens,\n add: _addPropTween,\n kill: _killPropTweensOf,\n modifier: _addPluginModifier,\n rawVars: 0\n },\n statics = {\n targetTest: 0,\n get: 0,\n getSetter: _getSetter,\n aliases: {},\n register: 0\n };\n\n _wake();\n\n if (config !== Plugin) {\n if (_plugins[name]) {\n return;\n }\n\n _setDefaults(Plugin, _setDefaults(_copyExcluding(config, instanceDefaults), statics)); //static methods\n\n\n _merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config, statics))); //instance methods\n\n\n _plugins[Plugin.prop = name] = Plugin;\n\n if (config.targetTest) {\n _harnessPlugins.push(Plugin);\n\n _reservedProps[name] = 1;\n }\n\n name = (name === \"css\" ? \"CSS\" : name.charAt(0).toUpperCase() + name.substr(1)) + \"Plugin\"; //for the global name. \"motionPath\" should become MotionPathPlugin\n }\n\n _addGlobal(name, Plugin);\n\n config.register && config.register(gsap, Plugin, PropTween);\n } else {\n _registerPluginQueue.push(config);\n }\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * COLORS\n * --------------------------------------------------------------------------------------\n */\n_255 = 255,\n _colorLookup = {\n aqua: [0, _255, _255],\n lime: [0, _255, 0],\n silver: [192, 192, 192],\n black: [0, 0, 0],\n maroon: [128, 0, 0],\n teal: [0, 128, 128],\n blue: [0, 0, _255],\n navy: [0, 0, 128],\n white: [_255, _255, _255],\n olive: [128, 128, 0],\n yellow: [_255, _255, 0],\n orange: [_255, 165, 0],\n gray: [128, 128, 128],\n purple: [128, 0, 128],\n green: [0, 128, 0],\n red: [_255, 0, 0],\n pink: [_255, 192, 203],\n cyan: [0, _255, _255],\n transparent: [_255, _255, _255, 0]\n},\n // possible future idea to replace the hard-coded color name values - put this in the ticker.wake() where we set the _doc:\n// let ctx = _doc.createElement(\"canvas\").getContext(\"2d\");\n// _forEachName(\"aqua,lime,silver,black,maroon,teal,blue,navy,white,olive,yellow,orange,gray,purple,green,red,pink,cyan\", color => {ctx.fillStyle = color; _colorLookup[color] = splitColor(ctx.fillStyle)});\n_hue = function _hue(h, m1, m2) {\n h += h < 0 ? 1 : h > 1 ? -1 : 0;\n return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < .5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + .5 | 0;\n},\n splitColor = function splitColor(v, toHSL, forceAlpha) {\n var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0,\n r,\n g,\n b,\n h,\n s,\n l,\n max,\n min,\n d,\n wasHSL;\n\n if (!a) {\n if (v.substr(-1) === \",\") {\n //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:\"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)\" - in this example \"blue,\" has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.\n v = v.substr(0, v.length - 1);\n }\n\n if (_colorLookup[v]) {\n a = _colorLookup[v];\n } else if (v.charAt(0) === \"#\") {\n if (v.length < 6) {\n //for shorthand like #9F0 or #9F0F (could have alpha)\n r = v.charAt(1);\n g = v.charAt(2);\n b = v.charAt(3);\n v = \"#\" + r + r + g + g + b + b + (v.length === 5 ? v.charAt(4) + v.charAt(4) : \"\");\n }\n\n if (v.length === 9) {\n // hex with alpha, like #fd5e53ff\n a = parseInt(v.substr(1, 6), 16);\n return [a >> 16, a >> 8 & _255, a & _255, parseInt(v.substr(7), 16) / 255];\n }\n\n v = parseInt(v.substr(1), 16);\n a = [v >> 16, v >> 8 & _255, v & _255];\n } else if (v.substr(0, 3) === \"hsl\") {\n a = wasHSL = v.match(_strictNumExp);\n\n if (!toHSL) {\n h = +a[0] % 360 / 360;\n s = +a[1] / 100;\n l = +a[2] / 100;\n g = l <= .5 ? l * (s + 1) : l + s - l * s;\n r = l * 2 - g;\n a.length > 3 && (a[3] *= 1); //cast as number\n\n a[0] = _hue(h + 1 / 3, r, g);\n a[1] = _hue(h, r, g);\n a[2] = _hue(h - 1 / 3, r, g);\n } else if (~v.indexOf(\"=\")) {\n //if relative values are found, just return the raw strings with the relative prefixes in place.\n a = v.match(_numExp);\n forceAlpha && a.length < 4 && (a[3] = 1);\n return a;\n }\n } else {\n a = v.match(_strictNumExp) || _colorLookup.transparent;\n }\n\n a = a.map(Number);\n }\n\n if (toHSL && !wasHSL) {\n r = a[0] / _255;\n g = a[1] / _255;\n b = a[2] / _255;\n max = Math.max(r, g, b);\n min = Math.min(r, g, b);\n l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0;\n } else {\n d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4;\n h *= 60;\n }\n\n a[0] = ~~(h + .5);\n a[1] = ~~(s * 100 + .5);\n a[2] = ~~(l * 100 + .5);\n }\n\n forceAlpha && a.length < 4 && (a[3] = 1);\n return a;\n},\n _colorOrderData = function _colorOrderData(v) {\n // strips out the colors from the string, finds all the numeric slots (with units) and returns an array of those. The Array also has a \"c\" property which is an Array of the index values where the colors belong. This is to help work around issues where there's a mis-matched order of color/numeric data like drop-shadow(#f00 0px 1px 2px) and drop-shadow(0x 1px 2px #f00). This is basically a helper function used in _formatColors()\n var values = [],\n c = [],\n i = -1;\n v.split(_colorExp).forEach(function (v) {\n var a = v.match(_numWithUnitExp) || [];\n values.push.apply(values, a);\n c.push(i += a.length + 1);\n });\n values.c = c;\n return values;\n},\n _formatColors = function _formatColors(s, toHSL, orderMatchData) {\n var result = \"\",\n colors = (s + result).match(_colorExp),\n type = toHSL ? \"hsla(\" : \"rgba(\",\n i = 0,\n c,\n shell,\n d,\n l;\n\n if (!colors) {\n return s;\n }\n\n colors = colors.map(function (color) {\n return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + \",\" + color[1] + \"%,\" + color[2] + \"%,\" + color[3] : color.join(\",\")) + \")\";\n });\n\n if (orderMatchData) {\n d = _colorOrderData(s);\n c = orderMatchData.c;\n\n if (c.join(result) !== d.c.join(result)) {\n shell = s.replace(_colorExp, \"1\").split(_numWithUnitExp);\n l = shell.length - 1;\n\n for (; i < l; i++) {\n result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + \"0,0,0,0)\" : (d.length ? d : colors.length ? colors : orderMatchData).shift());\n }\n }\n }\n\n if (!shell) {\n shell = s.split(_colorExp);\n l = shell.length - 1;\n\n for (; i < l; i++) {\n result += shell[i] + colors[i];\n }\n }\n\n return result + shell[l];\n},\n _colorExp = function () {\n var s = \"(?:\\\\b(?:(?:rgb|rgba|hsl|hsla)\\\\(.+?\\\\))|\\\\B#(?:[0-9a-f]{3,4}){1,2}\\\\b\",\n //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.,\n p;\n\n for (p in _colorLookup) {\n s += \"|\" + p + \"\\\\b\";\n }\n\n return new RegExp(s + \")\", \"gi\");\n}(),\n _hslExp = /hsl[a]?\\(/,\n _colorStringFilter = function _colorStringFilter(a) {\n var combined = a.join(\" \"),\n toHSL;\n _colorExp.lastIndex = 0;\n\n if (_colorExp.test(combined)) {\n toHSL = _hslExp.test(combined);\n a[1] = _formatColors(a[1], toHSL);\n a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1])); // make sure the order of numbers/colors match with the END value.\n\n return true;\n }\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * TICKER\n * --------------------------------------------------------------------------------------\n */\n_tickerActive,\n _ticker = function () {\n var _getTime = Date.now,\n _lagThreshold = 500,\n _adjustedLag = 33,\n _startTime = _getTime(),\n _lastUpdate = _startTime,\n _gap = 1000 / 240,\n _nextTime = _gap,\n _listeners = [],\n _id,\n _req,\n _raf,\n _self,\n _delta,\n _i,\n _tick = function _tick(v) {\n var elapsed = _getTime() - _lastUpdate,\n manual = v === true,\n overlap,\n dispatch,\n time,\n frame;\n\n (elapsed > _lagThreshold || elapsed < 0) && (_startTime += elapsed - _adjustedLag);\n _lastUpdate += elapsed;\n time = _lastUpdate - _startTime;\n overlap = time - _nextTime;\n\n if (overlap > 0 || manual) {\n frame = ++_self.frame;\n _delta = time - _self.time * 1000;\n _self.time = time = time / 1000;\n _nextTime += overlap + (overlap >= _gap ? 4 : _gap - overlap);\n dispatch = 1;\n }\n\n manual || (_id = _req(_tick)); //make sure the request is made before we dispatch the \"tick\" event so that timing is maintained. Otherwise, if processing the \"tick\" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.\n\n if (dispatch) {\n for (_i = 0; _i < _listeners.length; _i++) {\n // use _i and check _listeners.length instead of a variable because a listener could get removed during the loop, and if that happens to an element less than the current index, it'd throw things off in the loop.\n _listeners[_i](time, _delta, frame, v);\n }\n }\n };\n\n _self = {\n time: 0,\n frame: 0,\n tick: function tick() {\n _tick(true);\n },\n deltaRatio: function deltaRatio(fps) {\n return _delta / (1000 / (fps || 60));\n },\n wake: function wake() {\n if (_coreReady) {\n if (!_coreInitted && _windowExists()) {\n _win = _coreInitted = window;\n _doc = _win.document || {};\n _globals.gsap = gsap;\n (_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version);\n\n _install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {});\n\n _registerPluginQueue.forEach(_createPlugin);\n }\n\n _raf = typeof requestAnimationFrame !== \"undefined\" && requestAnimationFrame;\n _id && _self.sleep();\n\n _req = _raf || function (f) {\n return setTimeout(f, _nextTime - _self.time * 1000 + 1 | 0);\n };\n\n _tickerActive = 1;\n\n _tick(2);\n }\n },\n sleep: function sleep() {\n (_raf ? cancelAnimationFrame : clearTimeout)(_id);\n _tickerActive = 0;\n _req = _emptyFunc;\n },\n lagSmoothing: function lagSmoothing(threshold, adjustedLag) {\n _lagThreshold = threshold || Infinity; // zero should be interpreted as basically unlimited\n\n _adjustedLag = Math.min(adjustedLag || 33, _lagThreshold);\n },\n fps: function fps(_fps) {\n _gap = 1000 / (_fps || 240);\n _nextTime = _self.time * 1000 + _gap;\n },\n add: function add(callback, once, prioritize) {\n var func = once ? function (t, d, f, v) {\n callback(t, d, f, v);\n\n _self.remove(func);\n } : callback;\n\n _self.remove(callback);\n\n _listeners[prioritize ? \"unshift\" : \"push\"](func);\n\n _wake();\n\n return func;\n },\n remove: function remove(callback, i) {\n ~(i = _listeners.indexOf(callback)) && _listeners.splice(i, 1) && _i >= i && _i--;\n },\n _listeners: _listeners\n };\n return _self;\n}(),\n _wake = function _wake() {\n return !_tickerActive && _ticker.wake();\n},\n //also ensures the core classes are initialized.\n\n/*\n* -------------------------------------------------\n* EASING\n* -------------------------------------------------\n*/\n_easeMap = {},\n _customEaseExp = /^[\\d.\\-M][\\d.\\-,\\s]/,\n _quotesExp = /[\"']/g,\n _parseObjectInString = function _parseObjectInString(value) {\n //takes a string like \"{wiggles:10, type:anticipate})\" and turns it into a real object. Notice it ends in \")\" and includes the {} wrappers. This is because we only use this function for parsing ease configs and prioritized optimization rather than reusability.\n var obj = {},\n split = value.substr(1, value.length - 3).split(\":\"),\n key = split[0],\n i = 1,\n l = split.length,\n index,\n val,\n parsedVal;\n\n for (; i < l; i++) {\n val = split[i];\n index = i !== l - 1 ? val.lastIndexOf(\",\") : val.length;\n parsedVal = val.substr(0, index);\n obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, \"\").trim() : +parsedVal;\n key = val.substr(index + 1).trim();\n }\n\n return obj;\n},\n _valueInParentheses = function _valueInParentheses(value) {\n var open = value.indexOf(\"(\") + 1,\n close = value.indexOf(\")\"),\n nested = value.indexOf(\"(\", open);\n return value.substring(open, ~nested && nested < close ? value.indexOf(\")\", close + 1) : close);\n},\n _configEaseFromString = function _configEaseFromString(name) {\n //name can be a string like \"elastic.out(1,0.5)\", and pass in _easeMap as obj and it'll parse it out and call the actual function like _easeMap.Elastic.easeOut.config(1,0.5). It will also parse custom ease strings as long as CustomEase is loaded and registered (internally as _easeMap._CE).\n var split = (name + \"\").split(\"(\"),\n ease = _easeMap[split[0]];\n return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf(\"{\") ? [_parseObjectInString(split[1])] : _valueInParentheses(name).split(\",\").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE(\"\", name) : ease;\n},\n _invertEase = function _invertEase(ease) {\n return function (p) {\n return 1 - ease(1 - p);\n };\n},\n // allow yoyoEase to be set in children and have those affected when the parent/ancestor timeline yoyos.\n_propagateYoyoEase = function _propagateYoyoEase(timeline, isYoyo) {\n var child = timeline._first,\n ease;\n\n while (child) {\n if (child instanceof Timeline) {\n _propagateYoyoEase(child, isYoyo);\n } else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {\n if (child.timeline) {\n _propagateYoyoEase(child.timeline, isYoyo);\n } else {\n ease = child._ease;\n child._ease = child._yEase;\n child._yEase = ease;\n child._yoyo = isYoyo;\n }\n }\n\n child = child._next;\n }\n},\n _parseEase = function _parseEase(ease, defaultEase) {\n return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;\n},\n _insertEase = function _insertEase(names, easeIn, easeOut, easeInOut) {\n if (easeOut === void 0) {\n easeOut = function easeOut(p) {\n return 1 - easeIn(1 - p);\n };\n }\n\n if (easeInOut === void 0) {\n easeInOut = function easeInOut(p) {\n return p < .5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2;\n };\n }\n\n var ease = {\n easeIn: easeIn,\n easeOut: easeOut,\n easeInOut: easeInOut\n },\n lowercaseName;\n\n _forEachName(names, function (name) {\n _easeMap[name] = _globals[name] = ease;\n _easeMap[lowercaseName = name.toLowerCase()] = easeOut;\n\n for (var p in ease) {\n _easeMap[lowercaseName + (p === \"easeIn\" ? \".in\" : p === \"easeOut\" ? \".out\" : \".inOut\")] = _easeMap[name + \".\" + p] = ease[p];\n }\n });\n\n return ease;\n},\n _easeInOutFromOut = function _easeInOutFromOut(easeOut) {\n return function (p) {\n return p < .5 ? (1 - easeOut(1 - p * 2)) / 2 : .5 + easeOut((p - .5) * 2) / 2;\n };\n},\n _configElastic = function _configElastic(type, amplitude, period) {\n var p1 = amplitude >= 1 ? amplitude : 1,\n //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1.\n p2 = (period || (type ? .3 : .45)) / (amplitude < 1 ? amplitude : 1),\n p3 = p2 / _2PI * (Math.asin(1 / p1) || 0),\n easeOut = function easeOut(p) {\n return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1;\n },\n ease = type === \"out\" ? easeOut : type === \"in\" ? function (p) {\n return 1 - easeOut(1 - p);\n } : _easeInOutFromOut(easeOut);\n\n p2 = _2PI / p2; //precalculate to optimize\n\n ease.config = function (amplitude, period) {\n return _configElastic(type, amplitude, period);\n };\n\n return ease;\n},\n _configBack = function _configBack(type, overshoot) {\n if (overshoot === void 0) {\n overshoot = 1.70158;\n }\n\n var easeOut = function easeOut(p) {\n return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0;\n },\n ease = type === \"out\" ? easeOut : type === \"in\" ? function (p) {\n return 1 - easeOut(1 - p);\n } : _easeInOutFromOut(easeOut);\n\n ease.config = function (overshoot) {\n return _configBack(type, overshoot);\n };\n\n return ease;\n}; // a cheaper (kb and cpu) but more mild way to get a parameterized weighted ease by feeding in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.\n// _weightedEase = ratio => {\n// \tlet y = 0.5 + ratio / 2;\n// \treturn p => (2 * (1 - p) * p * y + p * p);\n// },\n// a stronger (but more expensive kb/cpu) parameterized weighted ease that lets you feed in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.\n// _weightedEaseStrong = ratio => {\n// \tratio = .5 + ratio / 2;\n// \tlet o = 1 / 3 * (ratio < .5 ? ratio : 1 - ratio),\n// \t\tb = ratio - o,\n// \t\tc = ratio + o;\n// \treturn p => p === 1 ? p : 3 * b * (1 - p) * (1 - p) * p + 3 * c * (1 - p) * p * p + p * p * p;\n// };\n\n\n_forEachName(\"Linear,Quad,Cubic,Quart,Quint,Strong\", function (name, i) {\n var power = i < 5 ? i + 1 : i;\n\n _insertEase(name + \",Power\" + (power - 1), i ? function (p) {\n return Math.pow(p, power);\n } : function (p) {\n return p;\n }, function (p) {\n return 1 - Math.pow(1 - p, power);\n }, function (p) {\n return p < .5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2;\n });\n});\n\n_easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn;\n\n_insertEase(\"Elastic\", _configElastic(\"in\"), _configElastic(\"out\"), _configElastic());\n\n(function (n, c) {\n var n1 = 1 / c,\n n2 = 2 * n1,\n n3 = 2.5 * n1,\n easeOut = function easeOut(p) {\n return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + .75 : p < n3 ? n * (p -= 2.25 / c) * p + .9375 : n * Math.pow(p - 2.625 / c, 2) + .984375;\n };\n\n _insertEase(\"Bounce\", function (p) {\n return 1 - easeOut(1 - p);\n }, easeOut);\n})(7.5625, 2.75);\n\n_insertEase(\"Expo\", function (p) {\n return p ? Math.pow(2, 10 * (p - 1)) : 0;\n});\n\n_insertEase(\"Circ\", function (p) {\n return -(_sqrt(1 - p * p) - 1);\n});\n\n_insertEase(\"Sine\", function (p) {\n return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1;\n});\n\n_insertEase(\"Back\", _configBack(\"in\"), _configBack(\"out\"), _configBack());\n\n_easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = {\n config: function config(steps, immediateStart) {\n if (steps === void 0) {\n steps = 1;\n }\n\n var p1 = 1 / steps,\n p2 = steps + (immediateStart ? 0 : 1),\n p3 = immediateStart ? 1 : 0,\n max = 1 - _tinyNum;\n return function (p) {\n return ((p2 * _clamp(0, max, p) | 0) + p3) * p1;\n };\n }\n};\n_defaults.ease = _easeMap[\"quad.out\"];\n\n_forEachName(\"onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt\", function (name) {\n return _callbackNames += name + \",\" + name + \"Params,\";\n});\n/*\n * --------------------------------------------------------------------------------------\n * CACHE\n * --------------------------------------------------------------------------------------\n */\n\n\nexport var GSCache = function GSCache(target, harness) {\n this.id = _gsID++;\n target._gsap = this;\n this.target = target;\n this.harness = harness;\n this.get = harness ? harness.get : _getProperty;\n this.set = harness ? harness.getSetter : _getSetter;\n};\n/*\n * --------------------------------------------------------------------------------------\n * ANIMATION\n * --------------------------------------------------------------------------------------\n */\n\nexport var Animation = /*#__PURE__*/function () {\n function Animation(vars) {\n this.vars = vars;\n this._delay = +vars.delay || 0;\n\n if (this._repeat = vars.repeat === Infinity ? -2 : vars.repeat || 0) {\n // TODO: repeat: Infinity on a timeline's children must flag that timeline internally and affect its totalDuration, otherwise it'll stop in the negative direction when reaching the start.\n this._rDelay = vars.repeatDelay || 0;\n this._yoyo = !!vars.yoyo || !!vars.yoyoEase;\n }\n\n this._ts = 1;\n\n _setDuration(this, +vars.duration, 1, 1);\n\n this.data = vars.data;\n\n if (_context) {\n this._ctx = _context;\n\n _context.data.push(this);\n }\n\n _tickerActive || _ticker.wake();\n }\n\n var _proto = Animation.prototype;\n\n _proto.delay = function delay(value) {\n if (value || value === 0) {\n this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay);\n this._delay = value;\n return this;\n }\n\n return this._delay;\n };\n\n _proto.duration = function duration(value) {\n return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur;\n };\n\n _proto.totalDuration = function totalDuration(value) {\n if (!arguments.length) {\n return this._tDur;\n }\n\n this._dirty = 0;\n return _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1));\n };\n\n _proto.totalTime = function totalTime(_totalTime, suppressEvents) {\n _wake();\n\n if (!arguments.length) {\n return this._tTime;\n }\n\n var parent = this._dp;\n\n if (parent && parent.smoothChildTiming && this._ts) {\n _alignPlayhead(this, _totalTime);\n\n !parent._dp || parent.parent || _postAddChecks(parent, this); // edge case: if this is a child of a timeline that already completed, for example, we must re-activate the parent.\n //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The start of that child would get pushed out, but one of the ancestors may have completed.\n\n while (parent && parent.parent) {\n if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) {\n parent.totalTime(parent._tTime, true);\n }\n\n parent = parent.parent;\n }\n\n if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) {\n //if the animation doesn't have a parent, put it back into its last parent (recorded as _dp for exactly cases like this). Limit to parents with autoRemoveChildren (like globalTimeline) so that if the user manually removes an animation from a timeline and then alters its playhead, it doesn't get added back in.\n _addToTimeline(this._dp, this, this._start - this._delay);\n }\n }\n\n if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted && (this.add || this._ptLookup)) {\n // check for _ptLookup on a Tween instance to ensure it has actually finished being instantiated, otherwise if this.reverse() gets called in the Animation constructor, it could trigger a render() here even though the _targets weren't populated, thus when _init() is called there won't be any PropTweens (it'll act like the tween is non-functional)\n this._ts || (this._pTime = _totalTime); // otherwise, if an animation is paused, then the playhead is moved back to zero, then resumed, it'd revert back to the original time at the pause\n //if (!this._lock) { // avoid endless recursion (not sure we need this yet or if it's worth the performance hit)\n // this._lock = 1;\n\n _lazySafeRender(this, _totalTime, suppressEvents); // this._lock = 0;\n //}\n\n }\n\n return this;\n };\n\n _proto.time = function time(value, suppressEvents) {\n return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time; // note: if the modulus results in 0, the playhead could be exactly at the end or the beginning, and we always defer to the END with a non-zero value, otherwise if you set the time() to the very end (duration()), it would render at the START!\n };\n\n _proto.totalProgress = function totalProgress(value, suppressEvents) {\n return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() > 0 ? 1 : 0;\n };\n\n _proto.progress = function progress(value, suppressEvents) {\n return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;\n };\n\n _proto.iteration = function iteration(value, suppressEvents) {\n var cycleDuration = this.duration() + this._rDelay;\n\n return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1;\n } // potential future addition:\n // isPlayingBackwards() {\n // \tlet animation = this,\n // \t\torientation = 1; // 1 = forward, -1 = backward\n // \twhile (animation) {\n // \t\torientation *= animation.reversed() || (animation.repeat() && !(animation.iteration() & 1)) ? -1 : 1;\n // \t\tanimation = animation.parent;\n // \t}\n // \treturn orientation < 0;\n // }\n ;\n\n _proto.timeScale = function timeScale(value, suppressEvents) {\n if (!arguments.length) {\n return this._rts === -_tinyNum ? 0 : this._rts; // recorded timeScale. Special case: if someone calls reverse() on an animation with timeScale of 0, we assign it -_tinyNum to remember it's reversed.\n }\n\n if (this._rts === value) {\n return this;\n }\n\n var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime; // make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation.\n // future addition? Up side: fast and minimal file size. Down side: only works on this animation; if a timeline is reversed, for example, its childrens' onReverse wouldn't get called.\n //(+value < 0 && this._rts >= 0) && _callback(this, \"onReverse\", true);\n // prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes.\n\n this._rts = +value || 0;\n this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; // _ts is the functional timeScale which would be 0 if the animation is paused.\n\n this.totalTime(_clamp(-Math.abs(this._delay), this._tDur, tTime), suppressEvents !== false);\n\n _setEnd(this); // if parent.smoothChildTiming was false, the end time didn't get updated in the _alignPlayhead() method, so do it here.\n\n\n return _recacheAncestors(this);\n };\n\n _proto.paused = function paused(value) {\n if (!arguments.length) {\n return this._ps;\n }\n\n if (this._ps !== value) {\n this._ps = value;\n\n if (value) {\n this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()); // if the pause occurs during the delay phase, make sure that's factored in when resuming.\n\n this._ts = this._act = 0; // _ts is the functional timeScale, so a paused tween would effectively have a timeScale of 0. We record the \"real\" timeScale as _rts (recorded time scale)\n } else {\n _wake();\n\n this._ts = this._rts; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated.\n\n this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum && (this._tTime -= _tinyNum)); // edge case: animation.progress(1).pause().play() wouldn't render again because the playhead is already at the end, but the call to totalTime() below will add it back to its parent...and not remove it again (since removing only happens upon rendering at a new time). Offsetting the _tTime slightly is done simply to cause the final render in totalTime() that'll pop it off its timeline (if autoRemoveChildren is true, of course). Check to make sure _zTime isn't -_tinyNum to avoid an edge case where the playhead is pushed to the end but INSIDE a tween/callback, the timeline itself is paused thus halting rendering and leaving a few unrendered. When resuming, it wouldn't render those otherwise.\n }\n }\n\n return this;\n };\n\n _proto.startTime = function startTime(value) {\n if (arguments.length) {\n this._start = value;\n var parent = this.parent || this._dp;\n parent && (parent._sort || !this.parent) && _addToTimeline(parent, this, value - this._delay);\n return this;\n }\n\n return this._start;\n };\n\n _proto.endTime = function endTime(includeRepeats) {\n return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1);\n };\n\n _proto.rawTime = function rawTime(wrapRepeats) {\n var parent = this.parent || this._dp; // _dp = detached parent\n\n return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this);\n };\n\n _proto.revert = function revert(config) {\n if (config === void 0) {\n config = _revertConfig;\n }\n\n var prevIsReverting = _reverting;\n _reverting = config;\n\n if (this._initted || this._startAt) {\n this.timeline && this.timeline.revert(config);\n this.totalTime(-0.01, config.suppressEvents);\n }\n\n this.data !== \"nested\" && config.kill !== false && this.kill();\n _reverting = prevIsReverting;\n return this;\n };\n\n _proto.globalTime = function globalTime(rawTime) {\n var animation = this,\n time = arguments.length ? rawTime : animation.rawTime();\n\n while (animation) {\n time = animation._start + time / (Math.abs(animation._ts) || 1);\n animation = animation._dp;\n }\n\n return !this.parent && this._sat ? this._sat.globalTime(rawTime) : time; // the _startAt tweens for .fromTo() and .from() that have immediateRender should always be FIRST in the timeline (important for context.revert()). \"_sat\" stands for _startAtTween, referring to the parent tween that created the _startAt. We must discern if that tween had immediateRender so that we can know whether or not to prioritize it in revert().\n };\n\n _proto.repeat = function repeat(value) {\n if (arguments.length) {\n this._repeat = value === Infinity ? -2 : value;\n return _onUpdateTotalDuration(this);\n }\n\n return this._repeat === -2 ? Infinity : this._repeat;\n };\n\n _proto.repeatDelay = function repeatDelay(value) {\n if (arguments.length) {\n var time = this._time;\n this._rDelay = value;\n\n _onUpdateTotalDuration(this);\n\n return time ? this.time(time) : this;\n }\n\n return this._rDelay;\n };\n\n _proto.yoyo = function yoyo(value) {\n if (arguments.length) {\n this._yoyo = value;\n return this;\n }\n\n return this._yoyo;\n };\n\n _proto.seek = function seek(position, suppressEvents) {\n return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents));\n };\n\n _proto.restart = function restart(includeDelay, suppressEvents) {\n return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));\n };\n\n _proto.play = function play(from, suppressEvents) {\n from != null && this.seek(from, suppressEvents);\n return this.reversed(false).paused(false);\n };\n\n _proto.reverse = function reverse(from, suppressEvents) {\n from != null && this.seek(from || this.totalDuration(), suppressEvents);\n return this.reversed(true).paused(false);\n };\n\n _proto.pause = function pause(atTime, suppressEvents) {\n atTime != null && this.seek(atTime, suppressEvents);\n return this.paused(true);\n };\n\n _proto.resume = function resume() {\n return this.paused(false);\n };\n\n _proto.reversed = function reversed(value) {\n if (arguments.length) {\n !!value !== this.reversed() && this.timeScale(-this._rts || (value ? -_tinyNum : 0)); // in case timeScale is zero, reversing would have no effect so we use _tinyNum.\n\n return this;\n }\n\n return this._rts < 0;\n };\n\n _proto.invalidate = function invalidate() {\n this._initted = this._act = 0;\n this._zTime = -_tinyNum;\n return this;\n };\n\n _proto.isActive = function isActive() {\n var parent = this.parent || this._dp,\n start = this._start,\n rawTime;\n return !!(!parent || this._ts && this._initted && parent.isActive() && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum);\n };\n\n _proto.eventCallback = function eventCallback(type, callback, params) {\n var vars = this.vars;\n\n if (arguments.length > 1) {\n if (!callback) {\n delete vars[type];\n } else {\n vars[type] = callback;\n params && (vars[type + \"Params\"] = params);\n type === \"onUpdate\" && (this._onUpdate = callback);\n }\n\n return this;\n }\n\n return vars[type];\n };\n\n _proto.then = function then(onFulfilled) {\n var self = this;\n return new Promise(function (resolve) {\n var f = _isFunction(onFulfilled) ? onFulfilled : _passThrough,\n _resolve = function _resolve() {\n var _then = self.then;\n self.then = null; // temporarily null the then() method to avoid an infinite loop (see https://github.com/greensock/GSAP/issues/322)\n\n _isFunction(f) && (f = f(self)) && (f.then || f === self) && (self.then = _then);\n resolve(f);\n self.then = _then;\n };\n\n if (self._initted && self.totalProgress() === 1 && self._ts >= 0 || !self._tTime && self._ts < 0) {\n _resolve();\n } else {\n self._prom = _resolve;\n }\n });\n };\n\n _proto.kill = function kill() {\n _interrupt(this);\n };\n\n return Animation;\n}();\n\n_setDefaults(Animation.prototype, {\n _time: 0,\n _start: 0,\n _end: 0,\n _tTime: 0,\n _tDur: 0,\n _dirty: 0,\n _repeat: 0,\n _yoyo: false,\n parent: null,\n _initted: false,\n _rDelay: 0,\n _ts: 1,\n _dp: 0,\n ratio: 0,\n _zTime: -_tinyNum,\n _prom: 0,\n _ps: false,\n _rts: 1\n});\n/*\n * -------------------------------------------------\n * TIMELINE\n * -------------------------------------------------\n */\n\n\nexport var Timeline = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(Timeline, _Animation);\n\n function Timeline(vars, position) {\n var _this;\n\n if (vars === void 0) {\n vars = {};\n }\n\n _this = _Animation.call(this, vars) || this;\n _this.labels = {};\n _this.smoothChildTiming = !!vars.smoothChildTiming;\n _this.autoRemoveChildren = !!vars.autoRemoveChildren;\n _this._sort = _isNotFalse(vars.sortChildren);\n _globalTimeline && _addToTimeline(vars.parent || _globalTimeline, _assertThisInitialized(_this), position);\n vars.reversed && _this.reverse();\n vars.paused && _this.paused(true);\n vars.scrollTrigger && _scrollTrigger(_assertThisInitialized(_this), vars.scrollTrigger);\n return _this;\n }\n\n var _proto2 = Timeline.prototype;\n\n _proto2.to = function to(targets, vars, position) {\n _createTweenType(0, arguments, this);\n\n return this;\n };\n\n _proto2.from = function from(targets, vars, position) {\n _createTweenType(1, arguments, this);\n\n return this;\n };\n\n _proto2.fromTo = function fromTo(targets, fromVars, toVars, position) {\n _createTweenType(2, arguments, this);\n\n return this;\n };\n\n _proto2.set = function set(targets, vars, position) {\n vars.duration = 0;\n vars.parent = this;\n _inheritDefaults(vars).repeatDelay || (vars.repeat = 0);\n vars.immediateRender = !!vars.immediateRender;\n new Tween(targets, vars, _parsePosition(this, position), 1);\n return this;\n };\n\n _proto2.call = function call(callback, params, position) {\n return _addToTimeline(this, Tween.delayedCall(0, callback, params), position);\n } //ONLY for backward compatibility! Maybe delete?\n ;\n\n _proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {\n vars.duration = duration;\n vars.stagger = vars.stagger || stagger;\n vars.onComplete = onCompleteAll;\n vars.onCompleteParams = onCompleteAllParams;\n vars.parent = this;\n new Tween(targets, vars, _parsePosition(this, position));\n return this;\n };\n\n _proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {\n vars.runBackwards = 1;\n _inheritDefaults(vars).immediateRender = _isNotFalse(vars.immediateRender);\n return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams);\n };\n\n _proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) {\n toVars.startAt = fromVars;\n _inheritDefaults(toVars).immediateRender = _isNotFalse(toVars.immediateRender);\n return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams);\n };\n\n _proto2.render = function render(totalTime, suppressEvents, force) {\n var prevTime = this._time,\n tDur = this._dirty ? this.totalDuration() : this._tDur,\n dur = this._dur,\n tTime = totalTime <= 0 ? 0 : _roundPrecise(totalTime),\n // if a paused timeline is resumed (or its _start is updated for another reason...which rounds it), that could result in the playhead shifting a **tiny** amount and a zero-duration child at that spot may get rendered at a different ratio, like its totalTime in render() may be 1e-17 instead of 0, for example.\n crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur),\n time,\n child,\n next,\n iteration,\n cycleDuration,\n prevPaused,\n pauseTween,\n timeScale,\n prevStart,\n prevIteration,\n yoyo,\n isYoyo;\n this !== _globalTimeline && tTime > tDur && totalTime >= 0 && (tTime = tDur);\n\n if (tTime !== this._tTime || force || crossingStart) {\n if (prevTime !== this._time && dur) {\n //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).\n tTime += this._time - prevTime;\n totalTime += this._time - prevTime;\n }\n\n time = tTime;\n prevStart = this._start;\n timeScale = this._ts;\n prevPaused = !timeScale;\n\n if (crossingStart) {\n dur || (prevTime = this._zTime); //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.\n\n (totalTime || !suppressEvents) && (this._zTime = totalTime);\n }\n\n if (this._repeat) {\n //adjust the time for repeats and yoyos\n yoyo = this._yoyo;\n cycleDuration = dur + this._rDelay;\n\n if (this._repeat < -1 && totalTime < 0) {\n return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force);\n }\n\n time = _roundPrecise(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)\n\n if (tTime === tDur) {\n // the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't)\n iteration = this._repeat;\n time = dur;\n } else {\n iteration = ~~(tTime / cycleDuration);\n\n if (iteration && iteration === tTime / cycleDuration) {\n time = dur;\n iteration--;\n }\n\n time > dur && (time = dur);\n }\n\n prevIteration = _animationCycle(this._tTime, cycleDuration);\n !prevTime && this._tTime && prevIteration !== iteration && this._tTime - prevIteration * cycleDuration - this._dur <= 0 && (prevIteration = iteration); // edge case - if someone does addPause() at the very beginning of a repeating timeline, that pause is technically at the same spot as the end which causes this._time to get set to 0 when the totalTime would normally place the playhead at the end. See https://gsap.com/forums/topic/23823-closing-nav-animation-not-working-on-ie-and-iphone-6-maybe-other-older-browser/?tab=comments#comment-113005 also, this._tTime - prevIteration * cycleDuration - this._dur <= 0 just checks to make sure it wasn't previously in the \"repeatDelay\" portion\n\n if (yoyo && iteration & 1) {\n time = dur - time;\n isYoyo = 1;\n }\n /*\n make sure children at the end/beginning of the timeline are rendered properly. If, for example,\n a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which\n would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there\n could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So\n we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must\n ensure that zero-duration tweens at the very beginning or end of the Timeline work.\n */\n\n\n if (iteration !== prevIteration && !this._lock) {\n var rewinding = yoyo && prevIteration & 1,\n doesWrap = rewinding === (yoyo && iteration & 1);\n iteration < prevIteration && (rewinding = !rewinding);\n prevTime = rewinding ? 0 : tTime % dur ? dur : tTime; // if the playhead is landing exactly at the end of an iteration, use that totalTime rather than only the duration, otherwise it'll skip the 2nd render since it's effectively at the same time.\n\n this._lock = 1;\n this.render(prevTime || (isYoyo ? 0 : _roundPrecise(iteration * cycleDuration)), suppressEvents, !dur)._lock = 0;\n this._tTime = tTime; // if a user gets the iteration() inside the onRepeat, for example, it should be accurate.\n\n !suppressEvents && this.parent && _callback(this, \"onRepeat\");\n this.vars.repeatRefresh && !isYoyo && (this.invalidate()._lock = 1);\n\n if (prevTime && prevTime !== this._time || prevPaused !== !this._ts || this.vars.onRepeat && !this.parent && !this._act) {\n // if prevTime is 0 and we render at the very end, _time will be the end, thus won't match. So in this edge case, prevTime won't match _time but that's okay. If it gets killed in the onRepeat, eject as well.\n return this;\n }\n\n dur = this._dur; // in case the duration changed in the onRepeat\n\n tDur = this._tDur;\n\n if (doesWrap) {\n this._lock = 2;\n prevTime = rewinding ? dur : -0.0001;\n this.render(prevTime, true);\n this.vars.repeatRefresh && !isYoyo && this.invalidate();\n }\n\n this._lock = 0;\n\n if (!this._ts && !prevPaused) {\n return this;\n } //in order for yoyoEase to work properly when there's a stagger, we must swap out the ease in each sub-tween.\n\n\n _propagateYoyoEase(this, isYoyo);\n }\n }\n\n if (this._hasPause && !this._forcing && this._lock < 2) {\n pauseTween = _findNextPauseTween(this, _roundPrecise(prevTime), _roundPrecise(time));\n\n if (pauseTween) {\n tTime -= time - (time = pauseTween._start);\n }\n }\n\n this._tTime = tTime;\n this._time = time;\n this._act = !timeScale; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.\n\n if (!this._initted) {\n this._onUpdate = this.vars.onUpdate;\n this._initted = 1;\n this._zTime = totalTime;\n prevTime = 0; // upon init, the playhead should always go forward; someone could invalidate() a completed timeline and then if they restart(), that would make child tweens render in reverse order which could lock in the wrong starting values if they build on each other, like tl.to(obj, {x: 100}).to(obj, {x: 0}).\n }\n\n if (!prevTime && time && !suppressEvents && !iteration) {\n _callback(this, \"onStart\");\n\n if (this._tTime !== tTime) {\n // in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart.\n return this;\n }\n }\n\n if (time >= prevTime && totalTime >= 0) {\n child = this._first;\n\n while (child) {\n next = child._next;\n\n if ((child._act || time >= child._start) && child._ts && pauseTween !== child) {\n if (child.parent !== this) {\n // an extreme edge case - the child's render could do something like kill() the \"next\" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.\n return this.render(totalTime, suppressEvents, force);\n }\n\n child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force);\n\n if (time !== this._time || !this._ts && !prevPaused) {\n //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete\n pauseTween = 0;\n next && (tTime += this._zTime = -_tinyNum); // it didn't finish rendering, so flag zTime as negative so that so that the next time render() is called it'll be forced (to render any remaining children)\n\n break;\n }\n }\n\n child = next;\n }\n } else {\n child = this._last;\n var adjustedTime = totalTime < 0 ? totalTime : time; //when the playhead goes backward beyond the start of this timeline, we must pass that information down to the child animations so that zero-duration tweens know whether to render their starting or ending values.\n\n while (child) {\n next = child._prev;\n\n if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) {\n if (child.parent !== this) {\n // an extreme edge case - the child's render could do something like kill() the \"next\" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.\n return this.render(totalTime, suppressEvents, force);\n }\n\n child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force || _reverting && (child._initted || child._startAt)); // if reverting, we should always force renders of initted tweens (but remember that .fromTo() or .from() may have a _startAt but not _initted yet). If, for example, a .fromTo() tween with a stagger (which creates an internal timeline) gets reverted BEFORE some of its child tweens render for the first time, it may not properly trigger them to revert.\n\n if (time !== this._time || !this._ts && !prevPaused) {\n //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete\n pauseTween = 0;\n next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum); // it didn't finish rendering, so adjust zTime so that so that the next time render() is called it'll be forced (to render any remaining children)\n\n break;\n }\n }\n\n child = next;\n }\n }\n\n if (pauseTween && !suppressEvents) {\n this.pause();\n pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1;\n\n if (this._ts) {\n //the callback resumed playback! So since we may have held back the playhead due to where the pause is positioned, go ahead and jump to where it's SUPPOSED to be (if no pause happened).\n this._start = prevStart; //if the pause was at an earlier time and the user resumed in the callback, it could reposition the timeline (changing its startTime), throwing things off slightly, so we make sure the _start doesn't shift.\n\n _setEnd(this);\n\n return this.render(totalTime, suppressEvents, force);\n }\n }\n\n this._onUpdate && !suppressEvents && _callback(this, \"onUpdate\", true);\n if (tTime === tDur && this._tTime >= this.totalDuration() || !tTime && prevTime) if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) if (!this._lock) {\n // remember, a child's callback may alter this timeline's playhead or timeScale which is why we need to add some of these checks.\n (totalTime || !dur) && (tTime === tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.\n\n if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime || !tDur)) {\n _callback(this, tTime === tDur && totalTime >= 0 ? \"onComplete\" : \"onReverseComplete\", true);\n\n this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();\n }\n }\n }\n\n return this;\n };\n\n _proto2.add = function add(child, position) {\n var _this2 = this;\n\n _isNumber(position) || (position = _parsePosition(this, position, child));\n\n if (!(child instanceof Animation)) {\n if (_isArray(child)) {\n child.forEach(function (obj) {\n return _this2.add(obj, position);\n });\n return this;\n }\n\n if (_isString(child)) {\n return this.addLabel(child, position);\n }\n\n if (_isFunction(child)) {\n child = Tween.delayedCall(0, child);\n } else {\n return this;\n }\n }\n\n return this !== child ? _addToTimeline(this, child, position) : this; //don't allow a timeline to be added to itself as a child!\n };\n\n _proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) {\n if (nested === void 0) {\n nested = true;\n }\n\n if (tweens === void 0) {\n tweens = true;\n }\n\n if (timelines === void 0) {\n timelines = true;\n }\n\n if (ignoreBeforeTime === void 0) {\n ignoreBeforeTime = -_bigNum;\n }\n\n var a = [],\n child = this._first;\n\n while (child) {\n if (child._start >= ignoreBeforeTime) {\n if (child instanceof Tween) {\n tweens && a.push(child);\n } else {\n timelines && a.push(child);\n nested && a.push.apply(a, child.getChildren(true, tweens, timelines));\n }\n }\n\n child = child._next;\n }\n\n return a;\n };\n\n _proto2.getById = function getById(id) {\n var animations = this.getChildren(1, 1, 1),\n i = animations.length;\n\n while (i--) {\n if (animations[i].vars.id === id) {\n return animations[i];\n }\n }\n };\n\n _proto2.remove = function remove(child) {\n if (_isString(child)) {\n return this.removeLabel(child);\n }\n\n if (_isFunction(child)) {\n return this.killTweensOf(child);\n }\n\n _removeLinkedListItem(this, child);\n\n if (child === this._recent) {\n this._recent = this._last;\n }\n\n return _uncache(this);\n };\n\n _proto2.totalTime = function totalTime(_totalTime2, suppressEvents) {\n if (!arguments.length) {\n return this._tTime;\n }\n\n this._forcing = 1;\n\n if (!this._dp && this._ts) {\n //special case for the global timeline (or any other that has no parent or detached parent).\n this._start = _roundPrecise(_ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts));\n }\n\n _Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents);\n\n this._forcing = 0;\n return this;\n };\n\n _proto2.addLabel = function addLabel(label, position) {\n this.labels[label] = _parsePosition(this, position);\n return this;\n };\n\n _proto2.removeLabel = function removeLabel(label) {\n delete this.labels[label];\n return this;\n };\n\n _proto2.addPause = function addPause(position, callback, params) {\n var t = Tween.delayedCall(0, callback || _emptyFunc, params);\n t.data = \"isPause\";\n this._hasPause = 1;\n return _addToTimeline(this, t, _parsePosition(this, position));\n };\n\n _proto2.removePause = function removePause(position) {\n var child = this._first;\n position = _parsePosition(this, position);\n\n while (child) {\n if (child._start === position && child.data === \"isPause\") {\n _removeFromParent(child);\n }\n\n child = child._next;\n }\n };\n\n _proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) {\n var tweens = this.getTweensOf(targets, onlyActive),\n i = tweens.length;\n\n while (i--) {\n _overwritingTween !== tweens[i] && tweens[i].kill(targets, props);\n }\n\n return this;\n };\n\n _proto2.getTweensOf = function getTweensOf(targets, onlyActive) {\n var a = [],\n parsedTargets = toArray(targets),\n child = this._first,\n isGlobalTime = _isNumber(onlyActive),\n // a number is interpreted as a global time. If the animation spans\n children;\n\n while (child) {\n if (child instanceof Tween) {\n if (_arrayContainsAny(child._targets, parsedTargets) && (isGlobalTime ? (!_overwritingTween || child._initted && child._ts) && child.globalTime(0) <= onlyActive && child.globalTime(child.totalDuration()) > onlyActive : !onlyActive || child.isActive())) {\n // note: if this is for overwriting, it should only be for tweens that aren't paused and are initted.\n a.push(child);\n }\n } else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) {\n a.push.apply(a, children);\n }\n\n child = child._next;\n }\n\n return a;\n } // potential future feature - targets() on timelines\n // targets() {\n // \tlet result = [];\n // \tthis.getChildren(true, true, false).forEach(t => result.push(...t.targets()));\n // \treturn result.filter((v, i) => result.indexOf(v) === i);\n // }\n ;\n\n _proto2.tweenTo = function tweenTo(position, vars) {\n vars = vars || {};\n\n var tl = this,\n endTime = _parsePosition(tl, position),\n _vars = vars,\n startAt = _vars.startAt,\n _onStart = _vars.onStart,\n onStartParams = _vars.onStartParams,\n immediateRender = _vars.immediateRender,\n initted,\n tween = Tween.to(tl, _setDefaults({\n ease: vars.ease || \"none\",\n lazy: false,\n immediateRender: false,\n time: endTime,\n overwrite: \"auto\",\n duration: vars.duration || Math.abs((endTime - (startAt && \"time\" in startAt ? startAt.time : tl._time)) / tl.timeScale()) || _tinyNum,\n onStart: function onStart() {\n tl.pause();\n\n if (!initted) {\n var duration = vars.duration || Math.abs((endTime - (startAt && \"time\" in startAt ? startAt.time : tl._time)) / tl.timeScale());\n tween._dur !== duration && _setDuration(tween, duration, 0, 1).render(tween._time, true, true);\n initted = 1;\n }\n\n _onStart && _onStart.apply(tween, onStartParams || []); //in case the user had an onStart in the vars - we don't want to overwrite it.\n }\n }, vars));\n\n return immediateRender ? tween.render(0) : tween;\n };\n\n _proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) {\n return this.tweenTo(toPosition, _setDefaults({\n startAt: {\n time: _parsePosition(this, fromPosition)\n }\n }, vars));\n };\n\n _proto2.recent = function recent() {\n return this._recent;\n };\n\n _proto2.nextLabel = function nextLabel(afterTime) {\n if (afterTime === void 0) {\n afterTime = this._time;\n }\n\n return _getLabelInDirection(this, _parsePosition(this, afterTime));\n };\n\n _proto2.previousLabel = function previousLabel(beforeTime) {\n if (beforeTime === void 0) {\n beforeTime = this._time;\n }\n\n return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1);\n };\n\n _proto2.currentLabel = function currentLabel(value) {\n return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum);\n };\n\n _proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) {\n if (ignoreBeforeTime === void 0) {\n ignoreBeforeTime = 0;\n }\n\n var child = this._first,\n labels = this.labels,\n p;\n\n while (child) {\n if (child._start >= ignoreBeforeTime) {\n child._start += amount;\n child._end += amount;\n }\n\n child = child._next;\n }\n\n if (adjustLabels) {\n for (p in labels) {\n if (labels[p] >= ignoreBeforeTime) {\n labels[p] += amount;\n }\n }\n }\n\n return _uncache(this);\n };\n\n _proto2.invalidate = function invalidate(soft) {\n var child = this._first;\n this._lock = 0;\n\n while (child) {\n child.invalidate(soft);\n child = child._next;\n }\n\n return _Animation.prototype.invalidate.call(this, soft);\n };\n\n _proto2.clear = function clear(includeLabels) {\n if (includeLabels === void 0) {\n includeLabels = true;\n }\n\n var child = this._first,\n next;\n\n while (child) {\n next = child._next;\n this.remove(child);\n child = next;\n }\n\n this._dp && (this._time = this._tTime = this._pTime = 0);\n includeLabels && (this.labels = {});\n return _uncache(this);\n };\n\n _proto2.totalDuration = function totalDuration(value) {\n var max = 0,\n self = this,\n child = self._last,\n prevStart = _bigNum,\n prev,\n start,\n parent;\n\n if (arguments.length) {\n return self.timeScale((self._repeat < 0 ? self.duration() : self.totalDuration()) / (self.reversed() ? -value : value));\n }\n\n if (self._dirty) {\n parent = self.parent;\n\n while (child) {\n prev = child._prev; //record it here in case the tween changes position in the sequence...\n\n child._dirty && child.totalDuration(); //could change the tween._startTime, so make sure the animation's cache is clean before analyzing it.\n\n start = child._start;\n\n if (start > prevStart && self._sort && child._ts && !self._lock) {\n //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence\n self._lock = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add().\n\n _addToTimeline(self, child, start - child._delay, 1)._lock = 0;\n } else {\n prevStart = start;\n }\n\n if (start < 0 && child._ts) {\n //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.\n max -= start;\n\n if (!parent && !self._dp || parent && parent.smoothChildTiming) {\n self._start += start / self._ts;\n self._time -= start;\n self._tTime -= start;\n }\n\n self.shiftChildren(-start, false, -1e999);\n prevStart = 0;\n }\n\n child._end > max && child._ts && (max = child._end);\n child = prev;\n }\n\n _setDuration(self, self === _globalTimeline && self._time > max ? self._time : max, 1, 1);\n\n self._dirty = 0;\n }\n\n return self._tDur;\n };\n\n Timeline.updateRoot = function updateRoot(time) {\n if (_globalTimeline._ts) {\n _lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline));\n\n _lastRenderedFrame = _ticker.frame;\n }\n\n if (_ticker.frame >= _nextGCFrame) {\n _nextGCFrame += _config.autoSleep || 120;\n var child = _globalTimeline._first;\n if (!child || !child._ts) if (_config.autoSleep && _ticker._listeners.length < 2) {\n while (child && !child._ts) {\n child = child._next;\n }\n\n child || _ticker.sleep();\n }\n }\n };\n\n return Timeline;\n}(Animation);\n\n_setDefaults(Timeline.prototype, {\n _lock: 0,\n _hasPause: 0,\n _forcing: 0\n});\n\nvar _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) {\n //note: we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter),\n index = 0,\n matchIndex = 0,\n result,\n startNums,\n color,\n endNum,\n chunk,\n startNum,\n hasRandom,\n a;\n pt.b = start;\n pt.e = end;\n start += \"\"; //ensure values are strings\n\n end += \"\";\n\n if (hasRandom = ~end.indexOf(\"random(\")) {\n end = _replaceRandom(end);\n }\n\n if (stringFilter) {\n a = [start, end];\n stringFilter(a, target, prop); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.\n\n start = a[0];\n end = a[1];\n }\n\n startNums = start.match(_complexStringNumExp) || [];\n\n while (result = _complexStringNumExp.exec(end)) {\n endNum = result[0];\n chunk = end.substring(index, result.index);\n\n if (color) {\n color = (color + 1) % 5;\n } else if (chunk.substr(-5) === \"rgba(\") {\n color = 1;\n }\n\n if (endNum !== startNums[matchIndex++]) {\n startNum = parseFloat(startNums[matchIndex - 1]) || 0; //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.\n\n pt._pt = {\n _next: pt._pt,\n p: chunk || matchIndex === 1 ? chunk : \",\",\n //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.\n s: startNum,\n c: endNum.charAt(1) === \"=\" ? _parseRelative(startNum, endNum) - startNum : parseFloat(endNum) - startNum,\n m: color && color < 4 ? Math.round : 0\n };\n index = _complexStringNumExp.lastIndex;\n }\n }\n\n pt.c = index < end.length ? end.substring(index, end.length) : \"\"; //we use the \"c\" of the PropTween to store the final part of the string (after the last number)\n\n pt.fp = funcParam;\n\n if (_relExp.test(end) || hasRandom) {\n pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).\n }\n\n this._pt = pt; //start the linked list with this new PropTween. Remember, we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n\n return pt;\n},\n _addPropTween = function _addPropTween(target, prop, start, end, index, targets, modifier, stringFilter, funcParam, optional) {\n _isFunction(end) && (end = end(index || 0, target, targets));\n var currentValue = target[prop],\n parsedStart = start !== \"get\" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf(\"set\") || !_isFunction(target[\"get\" + prop.substr(3)]) ? prop : \"get\" + prop.substr(3)](funcParam) : target[prop](),\n setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc,\n pt;\n\n if (_isString(end)) {\n if (~end.indexOf(\"random(\")) {\n end = _replaceRandom(end);\n }\n\n if (end.charAt(1) === \"=\") {\n pt = _parseRelative(parsedStart, end) + (getUnit(parsedStart) || 0);\n\n if (pt || pt === 0) {\n // to avoid isNaN, like if someone passes in a value like \"!= whatever\"\n end = pt;\n }\n }\n }\n\n if (!optional || parsedStart !== end || _forceAllPropTweens) {\n if (!isNaN(parsedStart * end) && end !== \"\") {\n // fun fact: any number multiplied by \"\" is evaluated as the number 0!\n pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === \"boolean\" ? _renderBoolean : _renderPlain, 0, setter);\n funcParam && (pt.fp = funcParam);\n modifier && pt.modifier(modifier, this, target);\n return this._pt = pt;\n }\n\n !currentValue && !(prop in target) && _missingPlugin(prop, end);\n return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam);\n }\n},\n //creates a copy of the vars object and processes any function-based values (putting the resulting values directly into the copy) as well as strings with \"random()\" in them. It does NOT process relative values.\n_processVars = function _processVars(vars, index, target, targets, tween) {\n _isFunction(vars) && (vars = _parseFuncOrString(vars, tween, index, target, targets));\n\n if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars) || _isTypedArray(vars)) {\n return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars;\n }\n\n var copy = {},\n p;\n\n for (p in vars) {\n copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets);\n }\n\n return copy;\n},\n _checkPlugin = function _checkPlugin(property, vars, tween, index, target, targets) {\n var plugin, pt, ptLookup, i;\n\n if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) {\n tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority);\n\n if (tween !== _quickTween) {\n ptLookup = tween._ptLookup[tween._targets.indexOf(target)]; //note: we can't use tween._ptLookup[index] because for staggered tweens, the index from the fullTargets array won't match what it is in each individual tween that spawns from the stagger.\n\n i = plugin._props.length;\n\n while (i--) {\n ptLookup[plugin._props[i]] = pt;\n }\n }\n }\n\n return plugin;\n},\n _overwritingTween,\n //store a reference temporarily so we can avoid overwriting itself.\n_forceAllPropTweens,\n _initTween = function _initTween(tween, time, tTime) {\n var vars = tween.vars,\n ease = vars.ease,\n startAt = vars.startAt,\n immediateRender = vars.immediateRender,\n lazy = vars.lazy,\n onUpdate = vars.onUpdate,\n runBackwards = vars.runBackwards,\n yoyoEase = vars.yoyoEase,\n keyframes = vars.keyframes,\n autoRevert = vars.autoRevert,\n dur = tween._dur,\n prevStartAt = tween._startAt,\n targets = tween._targets,\n parent = tween.parent,\n fullTargets = parent && parent.data === \"nested\" ? parent.vars.targets : targets,\n autoOverwrite = tween._overwrite === \"auto\" && !_suppressOverwrites,\n tl = tween.timeline,\n cleanVars,\n i,\n p,\n pt,\n target,\n hasPriority,\n gsData,\n harness,\n plugin,\n ptLookup,\n index,\n harnessVars,\n overwritten;\n tl && (!keyframes || !ease) && (ease = \"none\");\n tween._ease = _parseEase(ease, _defaults.ease);\n tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0;\n\n if (yoyoEase && tween._yoyo && !tween._repeat) {\n //there must have been a parent timeline with yoyo:true that is currently in its yoyo phase, so flip the eases.\n yoyoEase = tween._yEase;\n tween._yEase = tween._ease;\n tween._ease = yoyoEase;\n }\n\n tween._from = !tl && !!vars.runBackwards; //nested timelines should never run backwards - the backwards-ness is in the child tweens.\n\n if (!tl || keyframes && !vars.stagger) {\n //if there's an internal timeline, skip all the parsing because we passed that task down the chain.\n harness = targets[0] ? _getCache(targets[0]).harness : 0;\n harnessVars = harness && vars[harness.prop]; //someone may need to specify CSS-specific values AND non-CSS values, like if the element has an \"x\" property plus it's a standard DOM element. We allow people to distinguish by wrapping plugin-specific stuff in a css:{} object for example.\n\n cleanVars = _copyExcluding(vars, _reservedProps);\n\n if (prevStartAt) {\n prevStartAt._zTime < 0 && prevStartAt.progress(1); // in case it's a lazy startAt that hasn't rendered yet.\n\n time < 0 && runBackwards && immediateRender && !autoRevert ? prevStartAt.render(-1, true) : prevStartAt.revert(runBackwards && dur ? _revertConfigNoKill : _startAtRevertConfig); // if it's a \"startAt\" (not \"from()\" or runBackwards: true), we only need to do a shallow revert (keep transforms cached in CSSPlugin)\n // don't just _removeFromParent(prevStartAt.render(-1, true)) because that'll leave inline styles. We're creating a new _startAt for \"startAt\" tweens that re-capture things to ensure that if the pre-tween values changed since the tween was created, they're recorded.\n\n prevStartAt._lazy = 0;\n }\n\n if (startAt) {\n _removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({\n data: \"isStart\",\n overwrite: false,\n parent: parent,\n immediateRender: true,\n lazy: !prevStartAt && _isNotFalse(lazy),\n startAt: null,\n delay: 0,\n onUpdate: onUpdate && function () {\n return _callback(tween, \"onUpdate\");\n },\n stagger: 0\n }, startAt))); //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, from, to).fromTo(e, to, from);\n\n\n tween._startAt._dp = 0; // don't allow it to get put back into root timeline! Like when revert() is called and totalTime() gets set.\n\n tween._startAt._sat = tween; // used in globalTime(). _sat stands for _startAtTween\n\n time < 0 && (_reverting || !immediateRender && !autoRevert) && tween._startAt.revert(_revertConfigNoKill); // rare edge case, like if a render is forced in the negative direction of a non-initted tween.\n\n if (immediateRender) {\n if (dur && time <= 0 && tTime <= 0) {\n // check tTime here because in the case of a yoyo tween whose playhead gets pushed to the end like tween.progress(1), we should allow it through so that the onComplete gets fired properly.\n time && (tween._zTime = time);\n return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a Timeline, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.\n }\n }\n } else if (runBackwards && dur) {\n //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)\n if (!prevStartAt) {\n time && (immediateRender = false); //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0\n\n p = _setDefaults({\n overwrite: false,\n data: \"isFromStart\",\n //we tag the tween with as \"isFromStart\" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a \"from()\" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:\"height\", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.\n lazy: immediateRender && !prevStartAt && _isNotFalse(lazy),\n immediateRender: immediateRender,\n //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)\n stagger: 0,\n parent: parent //ensures that nested tweens that had a stagger are handled properly, like gsap.from(\".class\", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})\n\n }, cleanVars);\n harnessVars && (p[harness.prop] = harnessVars); // in case someone does something like .from(..., {css:{}})\n\n _removeFromParent(tween._startAt = Tween.set(targets, p));\n\n tween._startAt._dp = 0; // don't allow it to get put back into root timeline!\n\n tween._startAt._sat = tween; // used in globalTime()\n\n time < 0 && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween._startAt.render(-1, true));\n tween._zTime = time;\n\n if (!immediateRender) {\n _initTween(tween._startAt, _tinyNum, _tinyNum); //ensures that the initial values are recorded\n\n } else if (!time) {\n return;\n }\n }\n }\n\n tween._pt = tween._ptCache = 0;\n lazy = dur && _isNotFalse(lazy) || lazy && !dur;\n\n for (i = 0; i < targets.length; i++) {\n target = targets[i];\n gsData = target._gsap || _harness(targets)[i]._gsap;\n tween._ptLookup[i] = ptLookup = {};\n _lazyLookup[gsData.id] && _lazyTweens.length && _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)\n\n index = fullTargets === targets ? i : fullTargets.indexOf(target);\n\n if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) {\n tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority);\n\n plugin._props.forEach(function (name) {\n ptLookup[name] = pt;\n });\n\n plugin.priority && (hasPriority = 1);\n }\n\n if (!harness || harnessVars) {\n for (p in cleanVars) {\n if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) {\n plugin.priority && (hasPriority = 1);\n } else {\n ptLookup[p] = pt = _addPropTween.call(tween, target, p, \"get\", cleanVars[p], index, fullTargets, 0, vars.stringFilter);\n }\n }\n }\n\n tween._op && tween._op[i] && tween.kill(target, tween._op[i]);\n\n if (autoOverwrite && tween._pt) {\n _overwritingTween = tween;\n\n _globalTimeline.killTweensOf(target, ptLookup, tween.globalTime(time)); // make sure the overwriting doesn't overwrite THIS tween!!!\n\n\n overwritten = !tween.parent;\n _overwritingTween = 0;\n }\n\n tween._pt && lazy && (_lazyLookup[gsData.id] = 1);\n }\n\n hasPriority && _sortPropTweensByPriority(tween);\n tween._onInit && tween._onInit(tween); //plugins like RoundProps must wait until ALL of the PropTweens are instantiated. In the plugin's init() function, it sets the _onInit on the tween instance. May not be pretty/intuitive, but it's fast and keeps file size down.\n }\n\n tween._onUpdate = onUpdate;\n tween._initted = (!tween._op || tween._pt) && !overwritten; // if overwrittenProps resulted in the entire tween being killed, do NOT flag it as initted or else it may render for one tick.\n\n keyframes && time <= 0 && tl.render(_bigNum, true, true); // if there's a 0% keyframe, it'll render in the \"before\" state for any staggered/delayed animations thus when the following tween initializes, it'll use the \"before\" state instead of the \"after\" state as the initial values.\n},\n _updatePropTweens = function _updatePropTweens(tween, property, value, start, startIsRelative, ratio, time, skipRecursion) {\n var ptCache = (tween._pt && tween._ptCache || (tween._ptCache = {}))[property],\n pt,\n rootPT,\n lookup,\n i;\n\n if (!ptCache) {\n ptCache = tween._ptCache[property] = [];\n lookup = tween._ptLookup;\n i = tween._targets.length;\n\n while (i--) {\n pt = lookup[i][property];\n\n if (pt && pt.d && pt.d._pt) {\n // it's a plugin, so find the nested PropTween\n pt = pt.d._pt;\n\n while (pt && pt.p !== property && pt.fp !== property) {\n // \"fp\" is functionParam for things like setting CSS variables which require .setProperty(\"--var-name\", value)\n pt = pt._next;\n }\n }\n\n if (!pt) {\n // there is no PropTween associated with that property, so we must FORCE one to be created and ditch out of this\n // if the tween has other properties that already rendered at new positions, we'd normally have to rewind to put them back like tween.render(0, true) before forcing an _initTween(), but that can create another edge case like tweening a timeline's progress would trigger onUpdates to fire which could move other things around. It's better to just inform users that .resetTo() should ONLY be used for tweens that already have that property. For example, you can't gsap.to(...{ y: 0 }) and then tween.restTo(\"x\", 200) for example.\n _forceAllPropTweens = 1; // otherwise, when we _addPropTween() and it finds no change between the start and end values, it skips creating a PropTween (for efficiency...why tween when there's no difference?) but in this case we NEED that PropTween created so we can edit it.\n\n tween.vars[property] = \"+=0\";\n\n _initTween(tween, time);\n\n _forceAllPropTweens = 0;\n return skipRecursion ? _warn(property + \" not eligible for reset\") : 1; // if someone tries to do a quickTo() on a special property like borderRadius which must get split into 4 different properties, that's not eligible for .resetTo().\n }\n\n ptCache.push(pt);\n }\n }\n\n i = ptCache.length;\n\n while (i--) {\n rootPT = ptCache[i];\n pt = rootPT._pt || rootPT; // complex values may have nested PropTweens. We only accommodate the FIRST value.\n\n pt.s = (start || start === 0) && !startIsRelative ? start : pt.s + (start || 0) + ratio * pt.c;\n pt.c = value - pt.s;\n rootPT.e && (rootPT.e = _round(value) + getUnit(rootPT.e)); // mainly for CSSPlugin (end value)\n\n rootPT.b && (rootPT.b = pt.s + getUnit(rootPT.b)); // (beginning value)\n }\n},\n _addAliasesToVars = function _addAliasesToVars(targets, vars) {\n var harness = targets[0] ? _getCache(targets[0]).harness : 0,\n propertyAliases = harness && harness.aliases,\n copy,\n p,\n i,\n aliases;\n\n if (!propertyAliases) {\n return vars;\n }\n\n copy = _merge({}, vars);\n\n for (p in propertyAliases) {\n if (p in copy) {\n aliases = propertyAliases[p].split(\",\");\n i = aliases.length;\n\n while (i--) {\n copy[aliases[i]] = copy[p];\n }\n }\n }\n\n return copy;\n},\n // parses multiple formats, like {\"0%\": {x: 100}, {\"50%\": {x: -20}} and { x: {\"0%\": 100, \"50%\": -20} }, and an \"ease\" can be set on any object. We populate an \"allProps\" object with an Array for each property, like {x: [{}, {}], y:[{}, {}]} with data for each property tween. The objects have a \"t\" (time), \"v\", (value), and \"e\" (ease) property. This allows us to piece together a timeline later.\n_parseKeyframe = function _parseKeyframe(prop, obj, allProps, easeEach) {\n var ease = obj.ease || easeEach || \"power1.inOut\",\n p,\n a;\n\n if (_isArray(obj)) {\n a = allProps[prop] || (allProps[prop] = []); // t = time (out of 100), v = value, e = ease\n\n obj.forEach(function (value, i) {\n return a.push({\n t: i / (obj.length - 1) * 100,\n v: value,\n e: ease\n });\n });\n } else {\n for (p in obj) {\n a = allProps[p] || (allProps[p] = []);\n p === \"ease\" || a.push({\n t: parseFloat(prop),\n v: obj[p],\n e: ease\n });\n }\n }\n},\n _parseFuncOrString = function _parseFuncOrString(value, tween, i, target, targets) {\n return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf(\"random(\") ? _replaceRandom(value) : value;\n},\n _staggerTweenProps = _callbackNames + \"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert\",\n _staggerPropsToSkip = {};\n\n_forEachName(_staggerTweenProps + \",id,stagger,delay,duration,paused,scrollTrigger\", function (name) {\n return _staggerPropsToSkip[name] = 1;\n});\n/*\n * --------------------------------------------------------------------------------------\n * TWEEN\n * --------------------------------------------------------------------------------------\n */\n\n\nexport var Tween = /*#__PURE__*/function (_Animation2) {\n _inheritsLoose(Tween, _Animation2);\n\n function Tween(targets, vars, position, skipInherit) {\n var _this3;\n\n if (typeof vars === \"number\") {\n position.duration = vars;\n vars = position;\n position = null;\n }\n\n _this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this;\n var _this3$vars = _this3.vars,\n duration = _this3$vars.duration,\n delay = _this3$vars.delay,\n immediateRender = _this3$vars.immediateRender,\n stagger = _this3$vars.stagger,\n overwrite = _this3$vars.overwrite,\n keyframes = _this3$vars.keyframes,\n defaults = _this3$vars.defaults,\n scrollTrigger = _this3$vars.scrollTrigger,\n yoyoEase = _this3$vars.yoyoEase,\n parent = vars.parent || _globalTimeline,\n parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : \"length\" in vars) ? [targets] : toArray(targets),\n tl,\n i,\n copy,\n l,\n p,\n curTarget,\n staggerFunc,\n staggerVarsToMerge;\n _this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn(\"GSAP target \" + targets + \" not found. https://gsap.com\", !_config.nullTargetWarn) || [];\n _this3._ptLookup = []; //PropTween lookup. An array containing an object for each target, having keys for each tweening property\n\n _this3._overwrite = overwrite;\n\n if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {\n vars = _this3.vars;\n tl = _this3.timeline = new Timeline({\n data: \"nested\",\n defaults: defaults || {},\n targets: parent && parent.data === \"nested\" ? parent.vars.targets : parsedTargets\n }); // we need to store the targets because for staggers and keyframes, we end up creating an individual tween for each but function-based values need to know the index and the whole Array of targets.\n\n tl.kill();\n tl.parent = tl._dp = _assertThisInitialized(_this3);\n tl._start = 0;\n\n if (stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {\n l = parsedTargets.length;\n staggerFunc = stagger && distribute(stagger);\n\n if (_isObject(stagger)) {\n //users can pass in callbacks like onStart/onComplete in the stagger object. These should fire with each individual tween.\n for (p in stagger) {\n if (~_staggerTweenProps.indexOf(p)) {\n staggerVarsToMerge || (staggerVarsToMerge = {});\n staggerVarsToMerge[p] = stagger[p];\n }\n }\n }\n\n for (i = 0; i < l; i++) {\n copy = _copyExcluding(vars, _staggerPropsToSkip);\n copy.stagger = 0;\n yoyoEase && (copy.yoyoEase = yoyoEase);\n staggerVarsToMerge && _merge(copy, staggerVarsToMerge);\n curTarget = parsedTargets[i]; //don't just copy duration or delay because if they're a string or function, we'd end up in an infinite loop because _isFuncOrString() would evaluate as true in the child tweens, entering this loop, etc. So we parse the value straight from vars and default to 0.\n\n copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);\n copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this3), i, curTarget, parsedTargets) || 0) - _this3._delay;\n\n if (!stagger && l === 1 && copy.delay) {\n // if someone does delay:\"random(1, 5)\", repeat:-1, for example, the delay shouldn't be inside the repeat.\n _this3._delay = delay = copy.delay;\n _this3._start += delay;\n copy.delay = 0;\n }\n\n tl.to(curTarget, copy, staggerFunc ? staggerFunc(i, curTarget, parsedTargets) : 0);\n tl._ease = _easeMap.none;\n }\n\n tl.duration() ? duration = delay = 0 : _this3.timeline = 0; // if the timeline's duration is 0, we don't need a timeline internally!\n } else if (keyframes) {\n _inheritDefaults(_setDefaults(tl.vars.defaults, {\n ease: \"none\"\n }));\n\n tl._ease = _parseEase(keyframes.ease || vars.ease || \"none\");\n var time = 0,\n a,\n kf,\n v;\n\n if (_isArray(keyframes)) {\n keyframes.forEach(function (frame) {\n return tl.to(parsedTargets, frame, \">\");\n });\n tl.duration(); // to ensure tl._dur is cached because we tap into it for performance purposes in the render() method.\n } else {\n copy = {};\n\n for (p in keyframes) {\n p === \"ease\" || p === \"easeEach\" || _parseKeyframe(p, keyframes[p], copy, keyframes.easeEach);\n }\n\n for (p in copy) {\n a = copy[p].sort(function (a, b) {\n return a.t - b.t;\n });\n time = 0;\n\n for (i = 0; i < a.length; i++) {\n kf = a[i];\n v = {\n ease: kf.e,\n duration: (kf.t - (i ? a[i - 1].t : 0)) / 100 * duration\n };\n v[p] = kf.v;\n tl.to(parsedTargets, v, time);\n time += v.duration;\n }\n }\n\n tl.duration() < duration && tl.to({}, {\n duration: duration - tl.duration()\n }); // in case keyframes didn't go to 100%\n }\n }\n\n duration || _this3.duration(duration = tl.duration());\n } else {\n _this3.timeline = 0; //speed optimization, faster lookups (no going up the prototype chain)\n }\n\n if (overwrite === true && !_suppressOverwrites) {\n _overwritingTween = _assertThisInitialized(_this3);\n\n _globalTimeline.killTweensOf(parsedTargets);\n\n _overwritingTween = 0;\n }\n\n _addToTimeline(parent, _assertThisInitialized(_this3), position);\n\n vars.reversed && _this3.reverse();\n vars.paused && _this3.paused(true);\n\n if (immediateRender || !duration && !keyframes && _this3._start === _roundPrecise(parent._time) && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this3)) && parent.data !== \"nested\") {\n _this3._tTime = -_tinyNum; //forces a render without having to set the render() \"force\" parameter to true because we want to allow lazying by default (using the \"force\" parameter always forces an immediate full render)\n\n _this3.render(Math.max(0, -delay) || 0); //in case delay is negative\n\n }\n\n scrollTrigger && _scrollTrigger(_assertThisInitialized(_this3), scrollTrigger);\n return _this3;\n }\n\n var _proto3 = Tween.prototype;\n\n _proto3.render = function render(totalTime, suppressEvents, force) {\n var prevTime = this._time,\n tDur = this._tDur,\n dur = this._dur,\n isNegative = totalTime < 0,\n tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime,\n time,\n pt,\n iteration,\n cycleDuration,\n prevIteration,\n isYoyo,\n ratio,\n timeline,\n yoyoEase;\n\n if (!dur) {\n _renderZeroDurationTween(this, totalTime, suppressEvents, force);\n } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative) {\n //this senses if we're crossing over the start time, in which case we must record _zTime and force the render, but we do it in this lengthy conditional way for performance reasons (usually we can skip the calculations): this._initted && (this._zTime < 0) !== (totalTime < 0)\n time = tTime;\n timeline = this.timeline;\n\n if (this._repeat) {\n //adjust the time for repeats and yoyos\n cycleDuration = dur + this._rDelay;\n\n if (this._repeat < -1 && isNegative) {\n return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force);\n }\n\n time = _roundPrecise(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)\n\n if (tTime === tDur) {\n // the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't)\n iteration = this._repeat;\n time = dur;\n } else {\n iteration = ~~(tTime / cycleDuration);\n\n if (iteration && iteration === _roundPrecise(tTime / cycleDuration)) {\n time = dur;\n iteration--;\n }\n\n time > dur && (time = dur);\n }\n\n isYoyo = this._yoyo && iteration & 1;\n\n if (isYoyo) {\n yoyoEase = this._yEase;\n time = dur - time;\n }\n\n prevIteration = _animationCycle(this._tTime, cycleDuration);\n\n if (time === prevTime && !force && this._initted && iteration === prevIteration) {\n //could be during the repeatDelay part. No need to render and fire callbacks.\n this._tTime = tTime;\n return this;\n }\n\n if (iteration !== prevIteration) {\n timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo); //repeatRefresh functionality\n\n if (this.vars.repeatRefresh && !isYoyo && !this._lock && this._time !== cycleDuration && this._initted) {\n // this._time will === cycleDuration when we render at EXACTLY the end of an iteration. Without this condition, it'd often do the repeatRefresh render TWICE (again on the very next tick).\n this._lock = force = 1; //force, otherwise if lazy is true, the _attemptInitTween() will return and we'll jump out and get caught bouncing on each tick.\n\n this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;\n }\n }\n }\n\n if (!this._initted) {\n if (_attemptInitTween(this, isNegative ? totalTime : time, force, suppressEvents, tTime)) {\n this._tTime = 0; // in constructor if immediateRender is true, we set _tTime to -_tinyNum to have the playhead cross the starting point but we can't leave _tTime as a negative number.\n\n return this;\n }\n\n if (prevTime !== this._time && !(force && this.vars.repeatRefresh && iteration !== prevIteration)) {\n // rare edge case - during initialization, an onUpdate in the _startAt (.fromTo()) might force this tween to render at a different spot in which case we should ditch this render() call so that it doesn't revert the values. But we also don't want to dump if we're doing a repeatRefresh render!\n return this;\n }\n\n if (dur !== this._dur) {\n // while initting, a plugin like InertiaPlugin might alter the duration, so rerun from the start to ensure everything renders as it should.\n return this.render(totalTime, suppressEvents, force);\n }\n }\n\n this._tTime = tTime;\n this._time = time;\n\n if (!this._act && this._ts) {\n this._act = 1; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.\n\n this._lazy = 0;\n }\n\n this.ratio = ratio = (yoyoEase || this._ease)(time / dur);\n\n if (this._from) {\n this.ratio = ratio = 1 - ratio;\n }\n\n if (time && !prevTime && !suppressEvents && !iteration) {\n _callback(this, \"onStart\");\n\n if (this._tTime !== tTime) {\n // in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart.\n return this;\n }\n }\n\n pt = this._pt;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n\n timeline && timeline.render(totalTime < 0 ? totalTime : timeline._dur * timeline._ease(time / this._dur), suppressEvents, force) || this._startAt && (this._zTime = totalTime);\n\n if (this._onUpdate && !suppressEvents) {\n isNegative && _rewindStartAt(this, totalTime, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.\n\n _callback(this, \"onUpdate\");\n }\n\n this._repeat && iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent && _callback(this, \"onRepeat\");\n\n if ((tTime === this._tDur || !tTime) && this._tTime === tTime) {\n isNegative && !this._onUpdate && _rewindStartAt(this, totalTime, true, true);\n (totalTime || !dur) && (tTime === this._tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if we're rendering at exactly a time of 0, as there could be autoRevert values that should get set on the next tick (if the playhead goes backward beyond the startTime, negative totalTime). Don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.\n\n if (!suppressEvents && !(isNegative && !prevTime) && (tTime || prevTime || isYoyo)) {\n // if prevTime and tTime are zero, we shouldn't fire the onReverseComplete. This could happen if you gsap.to(... {paused:true}).play();\n _callback(this, tTime === tDur ? \"onComplete\" : \"onReverseComplete\", true);\n\n this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();\n }\n }\n }\n\n return this;\n };\n\n _proto3.targets = function targets() {\n return this._targets;\n };\n\n _proto3.invalidate = function invalidate(soft) {\n // \"soft\" gives us a way to clear out everything EXCEPT the recorded pre-\"from\" portion of from() tweens. Otherwise, for example, if you tween.progress(1).render(0, true true).invalidate(), the \"from\" values would persist and then on the next render, the from() tweens would initialize and the current value would match the \"from\" values, thus animate from the same value to the same value (no animation). We tap into this in ScrollTrigger's refresh() where we must push a tween to completion and then back again but honor its init state in case the tween is dependent on another tween further up on the page.\n (!soft || !this.vars.runBackwards) && (this._startAt = 0);\n this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0;\n this._ptLookup = [];\n this.timeline && this.timeline.invalidate(soft);\n return _Animation2.prototype.invalidate.call(this, soft);\n };\n\n _proto3.resetTo = function resetTo(property, value, start, startIsRelative, skipRecursion) {\n _tickerActive || _ticker.wake();\n this._ts || this.play();\n var time = Math.min(this._dur, (this._dp._time - this._start) * this._ts),\n ratio;\n this._initted || _initTween(this, time);\n ratio = this._ease(time / this._dur); // don't just get tween.ratio because it may not have rendered yet.\n // possible future addition to allow an object with multiple values to update, like tween.resetTo({x: 100, y: 200}); At this point, it doesn't seem worth the added kb given the fact that most users will likely opt for the convenient gsap.quickTo() way of interacting with this method.\n // if (_isObject(property)) { // performance optimization\n // \tfor (p in property) {\n // \t\tif (_updatePropTweens(this, p, property[p], value ? value[p] : null, start, ratio, time)) {\n // \t\t\treturn this.resetTo(property, value, start, startIsRelative); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again.\n // \t\t}\n // \t}\n // } else {\n\n if (_updatePropTweens(this, property, value, start, startIsRelative, ratio, time, skipRecursion)) {\n return this.resetTo(property, value, start, startIsRelative, 1); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again.\n } //}\n\n\n _alignPlayhead(this, 0);\n\n this.parent || _addLinkedListItem(this._dp, this, \"_first\", \"_last\", this._dp._sort ? \"_start\" : 0);\n return this.render(0);\n };\n\n _proto3.kill = function kill(targets, vars) {\n if (vars === void 0) {\n vars = \"all\";\n }\n\n if (!targets && (!vars || vars === \"all\")) {\n this._lazy = this._pt = 0;\n return this.parent ? _interrupt(this) : this;\n }\n\n if (this.timeline) {\n var tDur = this.timeline.totalDuration();\n this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true)._first || _interrupt(this); // if nothing is left tweening, interrupt.\n\n this.parent && tDur !== this.timeline.totalDuration() && _setDuration(this, this._dur * this.timeline._tDur / tDur, 0, 1); // if a nested tween is killed that changes the duration, it should affect this tween's duration. We must use the ratio, though, because sometimes the internal timeline is stretched like for keyframes where they don't all add up to whatever the parent tween's duration was set to.\n\n return this;\n }\n\n var parsedTargets = this._targets,\n killingTargets = targets ? toArray(targets) : parsedTargets,\n propTweenLookup = this._ptLookup,\n firstPT = this._pt,\n overwrittenProps,\n curLookup,\n curOverwriteProps,\n props,\n p,\n pt,\n i;\n\n if ((!vars || vars === \"all\") && _arraysMatch(parsedTargets, killingTargets)) {\n vars === \"all\" && (this._pt = 0);\n return _interrupt(this);\n }\n\n overwrittenProps = this._op = this._op || [];\n\n if (vars !== \"all\") {\n //so people can pass in a comma-delimited list of property names\n if (_isString(vars)) {\n p = {};\n\n _forEachName(vars, function (name) {\n return p[name] = 1;\n });\n\n vars = p;\n }\n\n vars = _addAliasesToVars(parsedTargets, vars);\n }\n\n i = parsedTargets.length;\n\n while (i--) {\n if (~killingTargets.indexOf(parsedTargets[i])) {\n curLookup = propTweenLookup[i];\n\n if (vars === \"all\") {\n overwrittenProps[i] = vars;\n props = curLookup;\n curOverwriteProps = {};\n } else {\n curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {};\n props = vars;\n }\n\n for (p in props) {\n pt = curLookup && curLookup[p];\n\n if (pt) {\n if (!(\"kill\" in pt.d) || pt.d.kill(p) === true) {\n _removeLinkedListItem(this, pt, \"_pt\");\n }\n\n delete curLookup[p];\n }\n\n if (curOverwriteProps !== \"all\") {\n curOverwriteProps[p] = 1;\n }\n }\n }\n }\n\n this._initted && !this._pt && firstPT && _interrupt(this); //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.\n\n return this;\n };\n\n Tween.to = function to(targets, vars) {\n return new Tween(targets, vars, arguments[2]);\n };\n\n Tween.from = function from(targets, vars) {\n return _createTweenType(1, arguments);\n };\n\n Tween.delayedCall = function delayedCall(delay, callback, params, scope) {\n return new Tween(callback, 0, {\n immediateRender: false,\n lazy: false,\n overwrite: false,\n delay: delay,\n onComplete: callback,\n onReverseComplete: callback,\n onCompleteParams: params,\n onReverseCompleteParams: params,\n callbackScope: scope\n }); // we must use onReverseComplete too for things like timeline.add(() => {...}) which should be triggered in BOTH directions (forward and reverse)\n };\n\n Tween.fromTo = function fromTo(targets, fromVars, toVars) {\n return _createTweenType(2, arguments);\n };\n\n Tween.set = function set(targets, vars) {\n vars.duration = 0;\n vars.repeatDelay || (vars.repeat = 0);\n return new Tween(targets, vars);\n };\n\n Tween.killTweensOf = function killTweensOf(targets, props, onlyActive) {\n return _globalTimeline.killTweensOf(targets, props, onlyActive);\n };\n\n return Tween;\n}(Animation);\n\n_setDefaults(Tween.prototype, {\n _targets: [],\n _lazy: 0,\n _startAt: 0,\n _op: 0,\n _onInit: 0\n}); //add the pertinent timeline methods to Tween instances so that users can chain conveniently and create a timeline automatically. (removed due to concerns that it'd ultimately add to more confusion especially for beginners)\n// _forEachName(\"to,from,fromTo,set,call,add,addLabel,addPause\", name => {\n// \tTween.prototype[name] = function() {\n// \t\tlet tl = new Timeline();\n// \t\treturn _addToTimeline(tl, this)[name].apply(tl, toArray(arguments));\n// \t}\n// });\n//for backward compatibility. Leverage the timeline calls.\n\n\n_forEachName(\"staggerTo,staggerFrom,staggerFromTo\", function (name) {\n Tween[name] = function () {\n var tl = new Timeline(),\n params = _slice.call(arguments, 0);\n\n params.splice(name === \"staggerFromTo\" ? 5 : 4, 0, 0);\n return tl[name].apply(tl, params);\n };\n});\n/*\n * --------------------------------------------------------------------------------------\n * PROPTWEEN\n * --------------------------------------------------------------------------------------\n */\n\n\nvar _setterPlain = function _setterPlain(target, property, value) {\n return target[property] = value;\n},\n _setterFunc = function _setterFunc(target, property, value) {\n return target[property](value);\n},\n _setterFuncWithParam = function _setterFuncWithParam(target, property, value, data) {\n return target[property](data.fp, value);\n},\n _setterAttribute = function _setterAttribute(target, property, value) {\n return target.setAttribute(property, value);\n},\n _getSetter = function _getSetter(target, property) {\n return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain;\n},\n _renderPlain = function _renderPlain(ratio, data) {\n return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 1000000) / 1000000, data);\n},\n _renderBoolean = function _renderBoolean(ratio, data) {\n return data.set(data.t, data.p, !!(data.s + data.c * ratio), data);\n},\n _renderComplexString = function _renderComplexString(ratio, data) {\n var pt = data._pt,\n s = \"\";\n\n if (!ratio && data.b) {\n //b = beginning string\n s = data.b;\n } else if (ratio === 1 && data.e) {\n //e = ending string\n s = data.e;\n } else {\n while (pt) {\n s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 10000) / 10000) + s; //we use the \"p\" property for the text inbetween (like a suffix). And in the context of a complex string, the modifier (m) is typically just Math.round(), like for RGB colors.\n\n pt = pt._next;\n }\n\n s += data.c; //we use the \"c\" of the PropTween to store the final chunk of non-numeric text.\n }\n\n data.set(data.t, data.p, s, data);\n},\n _renderPropTweens = function _renderPropTweens(ratio, data) {\n var pt = data._pt;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n},\n _addPluginModifier = function _addPluginModifier(modifier, tween, target, property) {\n var pt = this._pt,\n next;\n\n while (pt) {\n next = pt._next;\n pt.p === property && pt.modifier(modifier, tween, target);\n pt = next;\n }\n},\n _killPropTweensOf = function _killPropTweensOf(property) {\n var pt = this._pt,\n hasNonDependentRemaining,\n next;\n\n while (pt) {\n next = pt._next;\n\n if (pt.p === property && !pt.op || pt.op === property) {\n _removeLinkedListItem(this, pt, \"_pt\");\n } else if (!pt.dep) {\n hasNonDependentRemaining = 1;\n }\n\n pt = next;\n }\n\n return !hasNonDependentRemaining;\n},\n _setterWithModifier = function _setterWithModifier(target, property, value, data) {\n data.mSet(target, property, data.m.call(data.tween, value, data.mt), data);\n},\n _sortPropTweensByPriority = function _sortPropTweensByPriority(parent) {\n var pt = parent._pt,\n next,\n pt2,\n first,\n last; //sorts the PropTween linked list in order of priority because some plugins need to do their work after ALL of the PropTweens were created (like RoundPropsPlugin and ModifiersPlugin)\n\n while (pt) {\n next = pt._next;\n pt2 = first;\n\n while (pt2 && pt2.pr > pt.pr) {\n pt2 = pt2._next;\n }\n\n if (pt._prev = pt2 ? pt2._prev : last) {\n pt._prev._next = pt;\n } else {\n first = pt;\n }\n\n if (pt._next = pt2) {\n pt2._prev = pt;\n } else {\n last = pt;\n }\n\n pt = next;\n }\n\n parent._pt = first;\n}; //PropTween key: t = target, p = prop, r = renderer, d = data, s = start, c = change, op = overwriteProperty (ONLY populated when it's different than p), pr = priority, _next/_prev for the linked list siblings, set = setter, m = modifier, mSet = modifierSetter (the original setter, before a modifier was added)\n\n\nexport var PropTween = /*#__PURE__*/function () {\n function PropTween(next, target, prop, start, change, renderer, data, setter, priority) {\n this.t = target;\n this.s = start;\n this.c = change;\n this.p = prop;\n this.r = renderer || _renderPlain;\n this.d = data || this;\n this.set = setter || _setterPlain;\n this.pr = priority || 0;\n this._next = next;\n\n if (next) {\n next._prev = this;\n }\n }\n\n var _proto4 = PropTween.prototype;\n\n _proto4.modifier = function modifier(func, tween, target) {\n this.mSet = this.mSet || this.set; //in case it was already set (a PropTween can only have one modifier)\n\n this.set = _setterWithModifier;\n this.m = func;\n this.mt = target; //modifier target\n\n this.tween = tween;\n };\n\n return PropTween;\n}(); //Initialization tasks\n\n_forEachName(_callbackNames + \"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger\", function (name) {\n return _reservedProps[name] = 1;\n});\n\n_globals.TweenMax = _globals.TweenLite = Tween;\n_globals.TimelineLite = _globals.TimelineMax = Timeline;\n_globalTimeline = new Timeline({\n sortChildren: false,\n defaults: _defaults,\n autoRemoveChildren: true,\n id: \"root\",\n smoothChildTiming: true\n});\n_config.stringFilter = _colorStringFilter;\n\nvar _media = [],\n _listeners = {},\n _emptyArray = [],\n _lastMediaTime = 0,\n _contextID = 0,\n _dispatch = function _dispatch(type) {\n return (_listeners[type] || _emptyArray).map(function (f) {\n return f();\n });\n},\n _onMediaChange = function _onMediaChange() {\n var time = Date.now(),\n matches = [];\n\n if (time - _lastMediaTime > 2) {\n _dispatch(\"matchMediaInit\");\n\n _media.forEach(function (c) {\n var queries = c.queries,\n conditions = c.conditions,\n match,\n p,\n anyMatch,\n toggled;\n\n for (p in queries) {\n match = _win.matchMedia(queries[p]).matches; // Firefox doesn't update the \"matches\" property of the MediaQueryList object correctly - it only does so as it calls its change handler - so we must re-create a media query here to ensure it's accurate.\n\n match && (anyMatch = 1);\n\n if (match !== conditions[p]) {\n conditions[p] = match;\n toggled = 1;\n }\n }\n\n if (toggled) {\n c.revert();\n anyMatch && matches.push(c);\n }\n });\n\n _dispatch(\"matchMediaRevert\");\n\n matches.forEach(function (c) {\n return c.onMatch(c, function (func) {\n return c.add(null, func);\n });\n });\n _lastMediaTime = time;\n\n _dispatch(\"matchMedia\");\n }\n};\n\nvar Context = /*#__PURE__*/function () {\n function Context(func, scope) {\n this.selector = scope && selector(scope);\n this.data = [];\n this._r = []; // returned/cleanup functions\n\n this.isReverted = false;\n this.id = _contextID++; // to work around issues that frameworks like Vue cause by making things into Proxies which make it impossible to do something like _media.indexOf(this) because \"this\" would no longer refer to the Context instance itself - it'd refer to a Proxy! We needed a way to identify the context uniquely\n\n func && this.add(func);\n }\n\n var _proto5 = Context.prototype;\n\n _proto5.add = function add(name, func, scope) {\n // possible future addition if we need the ability to add() an animation to a context and for whatever reason cannot create that animation inside of a context.add(() => {...}) function.\n // if (name && _isFunction(name.revert)) {\n // \tthis.data.push(name);\n // \treturn (name._ctx = this);\n // }\n if (_isFunction(name)) {\n scope = func;\n func = name;\n name = _isFunction;\n }\n\n var self = this,\n f = function f() {\n var prev = _context,\n prevSelector = self.selector,\n result;\n prev && prev !== self && prev.data.push(self);\n scope && (self.selector = selector(scope));\n _context = self;\n result = func.apply(self, arguments);\n _isFunction(result) && self._r.push(result);\n _context = prev;\n self.selector = prevSelector;\n self.isReverted = false;\n return result;\n };\n\n self.last = f;\n return name === _isFunction ? f(self, function (func) {\n return self.add(null, func);\n }) : name ? self[name] = f : f;\n };\n\n _proto5.ignore = function ignore(func) {\n var prev = _context;\n _context = null;\n func(this);\n _context = prev;\n };\n\n _proto5.getTweens = function getTweens() {\n var a = [];\n this.data.forEach(function (e) {\n return e instanceof Context ? a.push.apply(a, e.getTweens()) : e instanceof Tween && !(e.parent && e.parent.data === \"nested\") && a.push(e);\n });\n return a;\n };\n\n _proto5.clear = function clear() {\n this._r.length = this.data.length = 0;\n };\n\n _proto5.kill = function kill(revert, matchMedia) {\n var _this4 = this;\n\n if (revert) {\n (function () {\n var tweens = _this4.getTweens(),\n i = _this4.data.length,\n t;\n\n while (i--) {\n // Flip plugin tweens are very different in that they should actually be pushed to their end. The plugin replaces the timeline's .revert() method to do exactly that. But we also need to remove any of those nested tweens inside the flip timeline so that they don't get individually reverted.\n t = _this4.data[i];\n\n if (t.data === \"isFlip\") {\n t.revert();\n t.getChildren(true, true, false).forEach(function (tween) {\n return tweens.splice(tweens.indexOf(tween), 1);\n });\n }\n } // save as an object so that we can cache the globalTime for each tween to optimize performance during the sort\n\n\n tweens.map(function (t) {\n return {\n g: t._dur || t._delay || t._sat && !t._sat.vars.immediateRender ? t.globalTime(0) : -Infinity,\n t: t\n };\n }).sort(function (a, b) {\n return b.g - a.g || -Infinity;\n }).forEach(function (o) {\n return o.t.revert(revert);\n }); // note: all of the _startAt tweens should be reverted in reverse order that they were created, and they'll all have the same globalTime (-1) so the \" || -1\" in the sort keeps the order properly.\n\n i = _this4.data.length;\n\n while (i--) {\n // make sure we loop backwards so that, for example, SplitTexts that were created later on the same element get reverted first\n t = _this4.data[i];\n\n if (t instanceof Timeline) {\n if (t.data !== \"nested\") {\n t.scrollTrigger && t.scrollTrigger.revert();\n t.kill(); // don't revert() the timeline because that's duplicating efforts since we already reverted all the tweens\n }\n } else {\n !(t instanceof Tween) && t.revert && t.revert(revert);\n }\n }\n\n _this4._r.forEach(function (f) {\n return f(revert, _this4);\n });\n\n _this4.isReverted = true;\n })();\n } else {\n this.data.forEach(function (e) {\n return e.kill && e.kill();\n });\n }\n\n this.clear();\n\n if (matchMedia) {\n var i = _media.length;\n\n while (i--) {\n // previously, we checked _media.indexOf(this), but some frameworks like Vue enforce Proxy objects that make it impossible to get the proper result that way, so we must use a unique ID number instead.\n _media[i].id === this.id && _media.splice(i, 1);\n }\n }\n };\n\n _proto5.revert = function revert(config) {\n this.kill(config || {});\n };\n\n return Context;\n}();\n\nvar MatchMedia = /*#__PURE__*/function () {\n function MatchMedia(scope) {\n this.contexts = [];\n this.scope = scope;\n _context && _context.data.push(this);\n }\n\n var _proto6 = MatchMedia.prototype;\n\n _proto6.add = function add(conditions, func, scope) {\n _isObject(conditions) || (conditions = {\n matches: conditions\n });\n var context = new Context(0, scope || this.scope),\n cond = context.conditions = {},\n mq,\n p,\n active;\n _context && !context.selector && (context.selector = _context.selector); // in case a context is created inside a context. Like a gsap.matchMedia() that's inside a scoped gsap.context()\n\n this.contexts.push(context);\n func = context.add(\"onMatch\", func);\n context.queries = conditions;\n\n for (p in conditions) {\n if (p === \"all\") {\n active = 1;\n } else {\n mq = _win.matchMedia(conditions[p]);\n\n if (mq) {\n _media.indexOf(context) < 0 && _media.push(context);\n (cond[p] = mq.matches) && (active = 1);\n mq.addListener ? mq.addListener(_onMediaChange) : mq.addEventListener(\"change\", _onMediaChange);\n }\n }\n }\n\n active && func(context, function (f) {\n return context.add(null, f);\n });\n return this;\n } // refresh() {\n // \tlet time = _lastMediaTime,\n // \t\tmedia = _media;\n // \t_lastMediaTime = -1;\n // \t_media = this.contexts;\n // \t_onMediaChange();\n // \t_lastMediaTime = time;\n // \t_media = media;\n // }\n ;\n\n _proto6.revert = function revert(config) {\n this.kill(config || {});\n };\n\n _proto6.kill = function kill(revert) {\n this.contexts.forEach(function (c) {\n return c.kill(revert, true);\n });\n };\n\n return MatchMedia;\n}();\n/*\n * --------------------------------------------------------------------------------------\n * GSAP\n * --------------------------------------------------------------------------------------\n */\n\n\nvar _gsap = {\n registerPlugin: function registerPlugin() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n args.forEach(function (config) {\n return _createPlugin(config);\n });\n },\n timeline: function timeline(vars) {\n return new Timeline(vars);\n },\n getTweensOf: function getTweensOf(targets, onlyActive) {\n return _globalTimeline.getTweensOf(targets, onlyActive);\n },\n getProperty: function getProperty(target, property, unit, uncache) {\n _isString(target) && (target = toArray(target)[0]); //in case selector text or an array is passed in\n\n var getter = _getCache(target || {}).get,\n format = unit ? _passThrough : _numericIfPossible;\n\n unit === \"native\" && (unit = \"\");\n return !target ? target : !property ? function (property, unit, uncache) {\n return format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));\n } : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));\n },\n quickSetter: function quickSetter(target, property, unit) {\n target = toArray(target);\n\n if (target.length > 1) {\n var setters = target.map(function (t) {\n return gsap.quickSetter(t, property, unit);\n }),\n l = setters.length;\n return function (value) {\n var i = l;\n\n while (i--) {\n setters[i](value);\n }\n };\n }\n\n target = target[0] || {};\n\n var Plugin = _plugins[property],\n cache = _getCache(target),\n p = cache.harness && (cache.harness.aliases || {})[property] || property,\n // in case it's an alias, like \"rotate\" for \"rotation\".\n setter = Plugin ? function (value) {\n var p = new Plugin();\n _quickTween._pt = 0;\n p.init(target, unit ? value + unit : value, _quickTween, 0, [target]);\n p.render(1, p);\n _quickTween._pt && _renderPropTweens(1, _quickTween);\n } : cache.set(target, p);\n\n return Plugin ? setter : function (value) {\n return setter(target, p, unit ? value + unit : value, cache, 1);\n };\n },\n quickTo: function quickTo(target, property, vars) {\n var _merge2;\n\n var tween = gsap.to(target, _merge((_merge2 = {}, _merge2[property] = \"+=0.1\", _merge2.paused = true, _merge2), vars || {})),\n func = function func(value, start, startIsRelative) {\n return tween.resetTo(property, value, start, startIsRelative);\n };\n\n func.tween = tween;\n return func;\n },\n isTweening: function isTweening(targets) {\n return _globalTimeline.getTweensOf(targets, true).length > 0;\n },\n defaults: function defaults(value) {\n value && value.ease && (value.ease = _parseEase(value.ease, _defaults.ease));\n return _mergeDeep(_defaults, value || {});\n },\n config: function config(value) {\n return _mergeDeep(_config, value || {});\n },\n registerEffect: function registerEffect(_ref3) {\n var name = _ref3.name,\n effect = _ref3.effect,\n plugins = _ref3.plugins,\n defaults = _ref3.defaults,\n extendTimeline = _ref3.extendTimeline;\n (plugins || \"\").split(\",\").forEach(function (pluginName) {\n return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + \" effect requires \" + pluginName + \" plugin.\");\n });\n\n _effects[name] = function (targets, vars, tl) {\n return effect(toArray(targets), _setDefaults(vars || {}, defaults), tl);\n };\n\n if (extendTimeline) {\n Timeline.prototype[name] = function (targets, vars, position) {\n return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}, this), position);\n };\n }\n },\n registerEase: function registerEase(name, ease) {\n _easeMap[name] = _parseEase(ease);\n },\n parseEase: function parseEase(ease, defaultEase) {\n return arguments.length ? _parseEase(ease, defaultEase) : _easeMap;\n },\n getById: function getById(id) {\n return _globalTimeline.getById(id);\n },\n exportRoot: function exportRoot(vars, includeDelayedCalls) {\n if (vars === void 0) {\n vars = {};\n }\n\n var tl = new Timeline(vars),\n child,\n next;\n tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming);\n\n _globalTimeline.remove(tl);\n\n tl._dp = 0; //otherwise it'll get re-activated when adding children and be re-introduced into _globalTimeline's linked list (then added to itself).\n\n tl._time = tl._tTime = _globalTimeline._time;\n child = _globalTimeline._first;\n\n while (child) {\n next = child._next;\n\n if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) {\n _addToTimeline(tl, child, child._start - child._delay);\n }\n\n child = next;\n }\n\n _addToTimeline(_globalTimeline, tl, 0);\n\n return tl;\n },\n context: function context(func, scope) {\n return func ? new Context(func, scope) : _context;\n },\n matchMedia: function matchMedia(scope) {\n return new MatchMedia(scope);\n },\n matchMediaRefresh: function matchMediaRefresh() {\n return _media.forEach(function (c) {\n var cond = c.conditions,\n found,\n p;\n\n for (p in cond) {\n if (cond[p]) {\n cond[p] = false;\n found = 1;\n }\n }\n\n found && c.revert();\n }) || _onMediaChange();\n },\n addEventListener: function addEventListener(type, callback) {\n var a = _listeners[type] || (_listeners[type] = []);\n ~a.indexOf(callback) || a.push(callback);\n },\n removeEventListener: function removeEventListener(type, callback) {\n var a = _listeners[type],\n i = a && a.indexOf(callback);\n i >= 0 && a.splice(i, 1);\n },\n utils: {\n wrap: wrap,\n wrapYoyo: wrapYoyo,\n distribute: distribute,\n random: random,\n snap: snap,\n normalize: normalize,\n getUnit: getUnit,\n clamp: clamp,\n splitColor: splitColor,\n toArray: toArray,\n selector: selector,\n mapRange: mapRange,\n pipe: pipe,\n unitize: unitize,\n interpolate: interpolate,\n shuffle: shuffle\n },\n install: _install,\n effects: _effects,\n ticker: _ticker,\n updateRoot: Timeline.updateRoot,\n plugins: _plugins,\n globalTimeline: _globalTimeline,\n core: {\n PropTween: PropTween,\n globals: _addGlobal,\n Tween: Tween,\n Timeline: Timeline,\n Animation: Animation,\n getCache: _getCache,\n _removeLinkedListItem: _removeLinkedListItem,\n reverting: function reverting() {\n return _reverting;\n },\n context: function context(toAdd) {\n if (toAdd && _context) {\n _context.data.push(toAdd);\n\n toAdd._ctx = _context;\n }\n\n return _context;\n },\n suppressOverwrites: function suppressOverwrites(value) {\n return _suppressOverwrites = value;\n }\n }\n};\n\n_forEachName(\"to,from,fromTo,delayedCall,set,killTweensOf\", function (name) {\n return _gsap[name] = Tween[name];\n});\n\n_ticker.add(Timeline.updateRoot);\n\n_quickTween = _gsap.to({}, {\n duration: 0\n}); // ---- EXTRA PLUGINS --------------------------------------------------------\n\nvar _getPluginPropTween = function _getPluginPropTween(plugin, prop) {\n var pt = plugin._pt;\n\n while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) {\n pt = pt._next;\n }\n\n return pt;\n},\n _addModifiers = function _addModifiers(tween, modifiers) {\n var targets = tween._targets,\n p,\n i,\n pt;\n\n for (p in modifiers) {\n i = targets.length;\n\n while (i--) {\n pt = tween._ptLookup[i][p];\n\n if (pt && (pt = pt.d)) {\n if (pt._pt) {\n // is a plugin\n pt = _getPluginPropTween(pt, p);\n }\n\n pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p);\n }\n }\n }\n},\n _buildModifierPlugin = function _buildModifierPlugin(name, modifier) {\n return {\n name: name,\n rawVars: 1,\n //don't pre-process function-based values or \"random()\" strings.\n init: function init(target, vars, tween) {\n tween._onInit = function (tween) {\n var temp, p;\n\n if (_isString(vars)) {\n temp = {};\n\n _forEachName(vars, function (name) {\n return temp[name] = 1;\n }); //if the user passes in a comma-delimited list of property names to roundProps, like \"x,y\", we round to whole numbers.\n\n\n vars = temp;\n }\n\n if (modifier) {\n temp = {};\n\n for (p in vars) {\n temp[p] = modifier(vars[p]);\n }\n\n vars = temp;\n }\n\n _addModifiers(tween, vars);\n };\n }\n };\n}; //register core plugins\n\n\nexport var gsap = _gsap.registerPlugin({\n name: \"attr\",\n init: function init(target, vars, tween, index, targets) {\n var p, pt, v;\n this.tween = tween;\n\n for (p in vars) {\n v = target.getAttribute(p) || \"\";\n pt = this.add(target, \"setAttribute\", (v || 0) + \"\", vars[p], index, targets, 0, 0, p);\n pt.op = p;\n pt.b = v; // record the beginning value so we can revert()\n\n this._props.push(p);\n }\n },\n render: function render(ratio, data) {\n var pt = data._pt;\n\n while (pt) {\n _reverting ? pt.set(pt.t, pt.p, pt.b, pt) : pt.r(ratio, pt.d); // if reverting, go back to the original (pt.b)\n\n pt = pt._next;\n }\n }\n}, {\n name: \"endArray\",\n init: function init(target, value) {\n var i = value.length;\n\n while (i--) {\n this.add(target, i, target[i] || 0, value[i], 0, 0, 0, 0, 0, 1);\n }\n }\n}, _buildModifierPlugin(\"roundProps\", _roundModifier), _buildModifierPlugin(\"modifiers\"), _buildModifierPlugin(\"snap\", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way.\n\nTween.version = Timeline.version = gsap.version = \"3.12.5\";\n_coreReady = 1;\n_windowExists() && _wake();\nvar Power0 = _easeMap.Power0,\n Power1 = _easeMap.Power1,\n Power2 = _easeMap.Power2,\n Power3 = _easeMap.Power3,\n Power4 = _easeMap.Power4,\n Linear = _easeMap.Linear,\n Quad = _easeMap.Quad,\n Cubic = _easeMap.Cubic,\n Quart = _easeMap.Quart,\n Quint = _easeMap.Quint,\n Strong = _easeMap.Strong,\n Elastic = _easeMap.Elastic,\n Back = _easeMap.Back,\n SteppedEase = _easeMap.SteppedEase,\n Bounce = _easeMap.Bounce,\n Sine = _easeMap.Sine,\n Expo = _easeMap.Expo,\n Circ = _easeMap.Circ;\nexport { Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ };\nexport { Tween as TweenMax, Tween as TweenLite, Timeline as TimelineMax, Timeline as TimelineLite, gsap as default, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, selector, mapRange, pipe, unitize, interpolate, shuffle }; //export some internal methods/orojects for use in CSSPlugin so that we can externalize that file and allow custom builds that exclude it.\n\nexport { _getProperty, _numExp, _numWithUnitExp, _isString, _isUndefined, _renderComplexString, _relExp, _setDefaults, _removeLinkedListItem, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _replaceRandom, _checkPlugin, _plugins, _ticker, _config, _roundModifier, _round, _missingPlugin, _getSetter, _getCache, _colorExp, _parseRelative };","/*!\n * CSSPlugin 3.12.5\n * https://gsap.com\n *\n * Copyright 2008-2024, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license or for\n * Club GSAP members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nimport { gsap, _getProperty, _numExp, _numWithUnitExp, getUnit, _isString, _isUndefined, _renderComplexString, _relExp, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _checkPlugin, _replaceRandom, _plugins, GSCache, PropTween, _config, _ticker, _round, _missingPlugin, _getSetter, _getCache, _colorExp, _parseRelative, _setDefaults, _removeLinkedListItem //for the commented-out className feature.\n} from \"./gsap-core.js\";\n\nvar _win,\n _doc,\n _docElement,\n _pluginInitted,\n _tempDiv,\n _tempDivStyler,\n _recentSetterPlugin,\n _reverting,\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _transformProps = {},\n _RAD2DEG = 180 / Math.PI,\n _DEG2RAD = Math.PI / 180,\n _atan2 = Math.atan2,\n _bigNum = 1e8,\n _capsExp = /([A-Z])/g,\n _horizontalExp = /(left|right|width|margin|padding|x)/i,\n _complexExp = /[\\s,\\(]\\S/,\n _propertyAliases = {\n autoAlpha: \"opacity,visibility\",\n scale: \"scaleX,scaleY\",\n alpha: \"opacity\"\n},\n _renderCSSProp = function _renderCSSProp(ratio, data) {\n return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);\n},\n _renderPropWithEnd = function _renderPropWithEnd(ratio, data) {\n return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);\n},\n _renderCSSPropWithBeginning = function _renderCSSPropWithBeginning(ratio, data) {\n return data.set(data.t, data.p, ratio ? Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u : data.b, data);\n},\n //if units change, we need a way to render the original unit/value when the tween goes all the way back to the beginning (ratio:0)\n_renderRoundedCSSProp = function _renderRoundedCSSProp(ratio, data) {\n var value = data.s + data.c * ratio;\n data.set(data.t, data.p, ~~(value + (value < 0 ? -.5 : .5)) + data.u, data);\n},\n _renderNonTweeningValue = function _renderNonTweeningValue(ratio, data) {\n return data.set(data.t, data.p, ratio ? data.e : data.b, data);\n},\n _renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd(ratio, data) {\n return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data);\n},\n _setterCSSStyle = function _setterCSSStyle(target, property, value) {\n return target.style[property] = value;\n},\n _setterCSSProp = function _setterCSSProp(target, property, value) {\n return target.style.setProperty(property, value);\n},\n _setterTransform = function _setterTransform(target, property, value) {\n return target._gsap[property] = value;\n},\n _setterScale = function _setterScale(target, property, value) {\n return target._gsap.scaleX = target._gsap.scaleY = value;\n},\n _setterScaleWithRender = function _setterScaleWithRender(target, property, value, data, ratio) {\n var cache = target._gsap;\n cache.scaleX = cache.scaleY = value;\n cache.renderTransform(ratio, cache);\n},\n _setterTransformWithRender = function _setterTransformWithRender(target, property, value, data, ratio) {\n var cache = target._gsap;\n cache[property] = value;\n cache.renderTransform(ratio, cache);\n},\n _transformProp = \"transform\",\n _transformOriginProp = _transformProp + \"Origin\",\n _saveStyle = function _saveStyle(property, isNotCSS) {\n var _this = this;\n\n var target = this.target,\n style = target.style,\n cache = target._gsap;\n\n if (property in _transformProps && style) {\n this.tfm = this.tfm || {};\n\n if (property !== \"transform\") {\n property = _propertyAliases[property] || property;\n ~property.indexOf(\",\") ? property.split(\",\").forEach(function (a) {\n return _this.tfm[a] = _get(target, a);\n }) : this.tfm[property] = cache.x ? cache[property] : _get(target, property); // note: scale would map to \"scaleX,scaleY\", thus we loop and apply them both.\n\n property === _transformOriginProp && (this.tfm.zOrigin = cache.zOrigin);\n } else {\n return _propertyAliases.transform.split(\",\").forEach(function (p) {\n return _saveStyle.call(_this, p, isNotCSS);\n });\n }\n\n if (this.props.indexOf(_transformProp) >= 0) {\n return;\n }\n\n if (cache.svg) {\n this.svgo = target.getAttribute(\"data-svg-origin\");\n this.props.push(_transformOriginProp, isNotCSS, \"\");\n }\n\n property = _transformProp;\n }\n\n (style || isNotCSS) && this.props.push(property, isNotCSS, style[property]);\n},\n _removeIndependentTransforms = function _removeIndependentTransforms(style) {\n if (style.translate) {\n style.removeProperty(\"translate\");\n style.removeProperty(\"scale\");\n style.removeProperty(\"rotate\");\n }\n},\n _revertStyle = function _revertStyle() {\n var props = this.props,\n target = this.target,\n style = target.style,\n cache = target._gsap,\n i,\n p;\n\n for (i = 0; i < props.length; i += 3) {\n // stored like this: property, isNotCSS, value\n props[i + 1] ? target[props[i]] = props[i + 2] : props[i + 2] ? style[props[i]] = props[i + 2] : style.removeProperty(props[i].substr(0, 2) === \"--\" ? props[i] : props[i].replace(_capsExp, \"-$1\").toLowerCase());\n }\n\n if (this.tfm) {\n for (p in this.tfm) {\n cache[p] = this.tfm[p];\n }\n\n if (cache.svg) {\n cache.renderTransform();\n target.setAttribute(\"data-svg-origin\", this.svgo || \"\");\n }\n\n i = _reverting();\n\n if ((!i || !i.isStart) && !style[_transformProp]) {\n _removeIndependentTransforms(style);\n\n if (cache.zOrigin && style[_transformOriginProp]) {\n style[_transformOriginProp] += \" \" + cache.zOrigin + \"px\"; // since we're uncaching, we must put the zOrigin back into the transformOrigin so that we can pull it out accurately when we parse again. Otherwise, we'd lose the z portion of the origin since we extract it to protect from Safari bugs.\n\n cache.zOrigin = 0;\n cache.renderTransform();\n }\n\n cache.uncache = 1; // if it's a startAt that's being reverted in the _initTween() of the core, we don't need to uncache transforms. This is purely a performance optimization.\n }\n }\n},\n _getStyleSaver = function _getStyleSaver(target, properties) {\n var saver = {\n target: target,\n props: [],\n revert: _revertStyle,\n save: _saveStyle\n };\n target._gsap || gsap.core.getCache(target); // just make sure there's a _gsap cache defined because we read from it in _saveStyle() and it's more efficient to just check it here once.\n\n properties && properties.split(\",\").forEach(function (p) {\n return saver.save(p);\n });\n return saver;\n},\n _supports3D,\n _createElement = function _createElement(type, ns) {\n var e = _doc.createElementNS ? _doc.createElementNS((ns || \"http://www.w3.org/1999/xhtml\").replace(/^https/, \"http\"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making \"style\" inaccessible.\n\n return e && e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://gsap.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).\n},\n _getComputedProperty = function _getComputedProperty(target, property, skipPrefixFallback) {\n var cs = getComputedStyle(target);\n return cs[property] || cs.getPropertyValue(property.replace(_capsExp, \"-$1\").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty(target, _checkPropPrefix(property) || property, 1) || \"\"; //css variables may not need caps swapped out for dashes and lowercase.\n},\n _prefixes = \"O,Moz,ms,Ms,Webkit\".split(\",\"),\n _checkPropPrefix = function _checkPropPrefix(property, element, preferPrefix) {\n var e = element || _tempDiv,\n s = e.style,\n i = 5;\n\n if (property in s && !preferPrefix) {\n return property;\n }\n\n property = property.charAt(0).toUpperCase() + property.substr(1);\n\n while (i-- && !(_prefixes[i] + property in s)) {}\n\n return i < 0 ? null : (i === 3 ? \"ms\" : i >= 0 ? _prefixes[i] : \"\") + property;\n},\n _initCore = function _initCore() {\n if (_windowExists() && window.document) {\n _win = window;\n _doc = _win.document;\n _docElement = _doc.documentElement;\n _tempDiv = _createElement(\"div\") || {\n style: {}\n };\n _tempDivStyler = _createElement(\"div\");\n _transformProp = _checkPropPrefix(_transformProp);\n _transformOriginProp = _transformProp + \"Origin\";\n _tempDiv.style.cssText = \"border-width:0;line-height:0;position:absolute;padding:0\"; //make sure to override certain properties that may contaminate measurements, in case the user has overreaching style sheets.\n\n _supports3D = !!_checkPropPrefix(\"perspective\");\n _reverting = gsap.core.reverting;\n _pluginInitted = 1;\n }\n},\n _getBBoxHack = function _getBBoxHack(swapIfPossible) {\n //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a <defs> element and/or <mask>. We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it).\n var svg = _createElement(\"svg\", this.ownerSVGElement && this.ownerSVGElement.getAttribute(\"xmlns\") || \"http://www.w3.org/2000/svg\"),\n oldParent = this.parentNode,\n oldSibling = this.nextSibling,\n oldCSS = this.style.cssText,\n bbox;\n\n _docElement.appendChild(svg);\n\n svg.appendChild(this);\n this.style.display = \"block\";\n\n if (swapIfPossible) {\n try {\n bbox = this.getBBox();\n this._gsapBBox = this.getBBox; //store the original\n\n this.getBBox = _getBBoxHack;\n } catch (e) {}\n } else if (this._gsapBBox) {\n bbox = this._gsapBBox();\n }\n\n if (oldParent) {\n if (oldSibling) {\n oldParent.insertBefore(this, oldSibling);\n } else {\n oldParent.appendChild(this);\n }\n }\n\n _docElement.removeChild(svg);\n\n this.style.cssText = oldCSS;\n return bbox;\n},\n _getAttributeFallbacks = function _getAttributeFallbacks(target, attributesArray) {\n var i = attributesArray.length;\n\n while (i--) {\n if (target.hasAttribute(attributesArray[i])) {\n return target.getAttribute(attributesArray[i]);\n }\n }\n},\n _getBBox = function _getBBox(target) {\n var bounds;\n\n try {\n bounds = target.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118\n } catch (error) {\n bounds = _getBBoxHack.call(target, true);\n }\n\n bounds && (bounds.width || bounds.height) || target.getBBox === _getBBoxHack || (bounds = _getBBoxHack.call(target, true)); //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case.\n\n return bounds && !bounds.width && !bounds.x && !bounds.y ? {\n x: +_getAttributeFallbacks(target, [\"x\", \"cx\", \"x1\"]) || 0,\n y: +_getAttributeFallbacks(target, [\"y\", \"cy\", \"y1\"]) || 0,\n width: 0,\n height: 0\n } : bounds;\n},\n _isSVG = function _isSVG(e) {\n return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));\n},\n //reports if the element is an SVG on which getBBox() actually works\n_removeProperty = function _removeProperty(target, property) {\n if (property) {\n var style = target.style,\n first2Chars;\n\n if (property in _transformProps && property !== _transformOriginProp) {\n property = _transformProp;\n }\n\n if (style.removeProperty) {\n first2Chars = property.substr(0, 2);\n\n if (first2Chars === \"ms\" || property.substr(0, 6) === \"webkit\") {\n //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be \"ms-transform\" instead of \"-ms-transform\" for IE9, for example)\n property = \"-\" + property;\n }\n\n style.removeProperty(first2Chars === \"--\" ? property : property.replace(_capsExp, \"-$1\").toLowerCase());\n } else {\n //note: old versions of IE use \"removeAttribute()\" instead of \"removeProperty()\"\n style.removeAttribute(property);\n }\n }\n},\n _addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) {\n var pt = new PropTween(plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue);\n plugin._pt = pt;\n pt.b = beginning;\n pt.e = end;\n\n plugin._props.push(property);\n\n return pt;\n},\n _nonConvertibleUnits = {\n deg: 1,\n rad: 1,\n turn: 1\n},\n _nonStandardLayouts = {\n grid: 1,\n flex: 1\n},\n //takes a single value like 20px and converts it to the unit specified, like \"%\", returning only the numeric amount.\n_convertToUnit = function _convertToUnit(target, property, value, unit) {\n var curValue = parseFloat(value) || 0,\n curUnit = (value + \"\").trim().substr((curValue + \"\").length) || \"px\",\n // some browsers leave extra whitespace at the beginning of CSS variables, hence the need to trim()\n style = _tempDiv.style,\n horizontal = _horizontalExp.test(property),\n isRootSVG = target.tagName.toLowerCase() === \"svg\",\n measureProperty = (isRootSVG ? \"client\" : \"offset\") + (horizontal ? \"Width\" : \"Height\"),\n amount = 100,\n toPixels = unit === \"px\",\n toPercent = unit === \"%\",\n px,\n parent,\n cache,\n isSVG;\n\n if (unit === curUnit || !curValue || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) {\n return curValue;\n }\n\n curUnit !== \"px\" && !toPixels && (curValue = _convertToUnit(target, property, value, \"px\"));\n isSVG = target.getCTM && _isSVG(target);\n\n if ((toPercent || curUnit === \"%\") && (_transformProps[property] || ~property.indexOf(\"adius\"))) {\n px = isSVG ? target.getBBox()[horizontal ? \"width\" : \"height\"] : target[measureProperty];\n return _round(toPercent ? curValue / px * amount : curValue / 100 * px);\n }\n\n style[horizontal ? \"width\" : \"height\"] = amount + (toPixels ? curUnit : unit);\n parent = ~property.indexOf(\"adius\") || unit === \"em\" && target.appendChild && !isRootSVG ? target : target.parentNode;\n\n if (isSVG) {\n parent = (target.ownerSVGElement || {}).parentNode;\n }\n\n if (!parent || parent === _doc || !parent.appendChild) {\n parent = _doc.body;\n }\n\n cache = parent._gsap;\n\n if (cache && toPercent && cache.width && horizontal && cache.time === _ticker.time && !cache.uncache) {\n return _round(curValue / cache.width * amount);\n } else {\n if (toPercent && (property === \"height\" || property === \"width\")) {\n // if we're dealing with width/height that's inside a container with padding and/or it's a flexbox/grid container, we must apply it to the target itself rather than the _tempDiv in order to ensure complete accuracy, factoring in the parent's padding.\n var v = target.style[property];\n target.style[property] = amount + unit;\n px = target[measureProperty];\n v ? target.style[property] = v : _removeProperty(target, property);\n } else {\n (toPercent || curUnit === \"%\") && !_nonStandardLayouts[_getComputedProperty(parent, \"display\")] && (style.position = _getComputedProperty(target, \"position\"));\n parent === target && (style.position = \"static\"); // like for borderRadius, if it's a % we must have it relative to the target itself but that may not have position: relative or position: absolute in which case it'd go up the chain until it finds its offsetParent (bad). position: static protects against that.\n\n parent.appendChild(_tempDiv);\n px = _tempDiv[measureProperty];\n parent.removeChild(_tempDiv);\n style.position = \"absolute\";\n }\n\n if (horizontal && toPercent) {\n cache = _getCache(parent);\n cache.time = _ticker.time;\n cache.width = parent[measureProperty];\n }\n }\n\n return _round(toPixels ? px * curValue / amount : px && curValue ? amount / px * curValue : 0);\n},\n _get = function _get(target, property, unit, uncache) {\n var value;\n _pluginInitted || _initCore();\n\n if (property in _propertyAliases && property !== \"transform\") {\n property = _propertyAliases[property];\n\n if (~property.indexOf(\",\")) {\n property = property.split(\",\")[0];\n }\n }\n\n if (_transformProps[property] && property !== \"transform\") {\n value = _parseTransform(target, uncache);\n value = property !== \"transformOrigin\" ? value[property] : value.svg ? value.origin : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + \" \" + value.zOrigin + \"px\";\n } else {\n value = target.style[property];\n\n if (!value || value === \"auto\" || uncache || ~(value + \"\").indexOf(\"calc(\")) {\n value = _specialProps[property] && _specialProps[property](target, property, unit) || _getComputedProperty(target, property) || _getProperty(target, property) || (property === \"opacity\" ? 1 : 0); // note: some browsers, like Firefox, don't report borderRadius correctly! Instead, it only reports every corner like borderTopLeftRadius\n }\n }\n\n return unit && !~(value + \"\").trim().indexOf(\" \") ? _convertToUnit(target, property, value, unit) + unit : value;\n},\n _tweenComplexCSSString = function _tweenComplexCSSString(target, prop, start, end) {\n // note: we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n if (!start || start === \"none\") {\n // some browsers like Safari actually PREFER the prefixed property and mis-report the unprefixed value like clipPath (BUG). In other words, even though clipPath exists in the style (\"clipPath\" in target.style) and it's set in the CSS properly (along with -webkit-clip-path), Safari reports clipPath as \"none\" whereas WebkitClipPath reports accurately like \"ellipse(100% 0% at 50% 0%)\", so in this case we must SWITCH to using the prefixed property instead. See https://gsap.com/forums/topic/18310-clippath-doesnt-work-on-ios/\n var p = _checkPropPrefix(prop, target, 1),\n s = p && _getComputedProperty(target, p, 1);\n\n if (s && s !== start) {\n prop = p;\n start = s;\n } else if (prop === \"borderColor\") {\n start = _getComputedProperty(target, \"borderTopColor\"); // Firefox bug: always reports \"borderColor\" as \"\", so we must fall back to borderTopColor. See https://gsap.com/forums/topic/24583-how-to-return-colors-that-i-had-after-reverse/\n }\n }\n\n var pt = new PropTween(this._pt, target.style, prop, 0, 1, _renderComplexString),\n index = 0,\n matchIndex = 0,\n a,\n result,\n startValues,\n startNum,\n color,\n startValue,\n endValue,\n endNum,\n chunk,\n endUnit,\n startUnit,\n endValues;\n pt.b = start;\n pt.e = end;\n start += \"\"; // ensure values are strings\n\n end += \"\";\n\n if (end === \"auto\") {\n startValue = target.style[prop];\n target.style[prop] = end;\n end = _getComputedProperty(target, prop) || end;\n startValue ? target.style[prop] = startValue : _removeProperty(target, prop);\n }\n\n a = [start, end];\n\n _colorStringFilter(a); // pass an array with the starting and ending values and let the filter do whatever it needs to the values. If colors are found, it returns true and then we must match where the color shows up order-wise because for things like boxShadow, sometimes the browser provides the computed values with the color FIRST, but the user provides it with the color LAST, so flip them if necessary. Same for drop-shadow().\n\n\n start = a[0];\n end = a[1];\n startValues = start.match(_numWithUnitExp) || [];\n endValues = end.match(_numWithUnitExp) || [];\n\n if (endValues.length) {\n while (result = _numWithUnitExp.exec(end)) {\n endValue = result[0];\n chunk = end.substring(index, result.index);\n\n if (color) {\n color = (color + 1) % 5;\n } else if (chunk.substr(-5) === \"rgba(\" || chunk.substr(-5) === \"hsla(\") {\n color = 1;\n }\n\n if (endValue !== (startValue = startValues[matchIndex++] || \"\")) {\n startNum = parseFloat(startValue) || 0;\n startUnit = startValue.substr((startNum + \"\").length);\n endValue.charAt(1) === \"=\" && (endValue = _parseRelative(startNum, endValue) + startUnit);\n endNum = parseFloat(endValue);\n endUnit = endValue.substr((endNum + \"\").length);\n index = _numWithUnitExp.lastIndex - endUnit.length;\n\n if (!endUnit) {\n //if something like \"perspective:300\" is passed in and we must add a unit to the end\n endUnit = endUnit || _config.units[prop] || startUnit;\n\n if (index === end.length) {\n end += endUnit;\n pt.e += endUnit;\n }\n }\n\n if (startUnit !== endUnit) {\n startNum = _convertToUnit(target, prop, startValue, endUnit) || 0;\n } // these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.\n\n\n pt._pt = {\n _next: pt._pt,\n p: chunk || matchIndex === 1 ? chunk : \",\",\n //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.\n s: startNum,\n c: endNum - startNum,\n m: color && color < 4 || prop === \"zIndex\" ? Math.round : 0\n };\n }\n }\n\n pt.c = index < end.length ? end.substring(index, end.length) : \"\"; //we use the \"c\" of the PropTween to store the final part of the string (after the last number)\n } else {\n pt.r = prop === \"display\" && end === \"none\" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue;\n }\n\n _relExp.test(end) && (pt.e = 0); //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).\n\n this._pt = pt; //start the linked list with this new PropTween. Remember, we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within another plugin too, thus \"this\" would refer to the plugin.\n\n return pt;\n},\n _keywordToPercent = {\n top: \"0%\",\n bottom: \"100%\",\n left: \"0%\",\n right: \"100%\",\n center: \"50%\"\n},\n _convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) {\n var split = value.split(\" \"),\n x = split[0],\n y = split[1] || \"50%\";\n\n if (x === \"top\" || x === \"bottom\" || y === \"left\" || y === \"right\") {\n //the user provided them in the wrong order, so flip them\n value = x;\n x = y;\n y = value;\n }\n\n split[0] = _keywordToPercent[x] || x;\n split[1] = _keywordToPercent[y] || y;\n return split.join(\" \");\n},\n _renderClearProps = function _renderClearProps(ratio, data) {\n if (data.tween && data.tween._time === data.tween._dur) {\n var target = data.t,\n style = target.style,\n props = data.u,\n cache = target._gsap,\n prop,\n clearTransforms,\n i;\n\n if (props === \"all\" || props === true) {\n style.cssText = \"\";\n clearTransforms = 1;\n } else {\n props = props.split(\",\");\n i = props.length;\n\n while (--i > -1) {\n prop = props[i];\n\n if (_transformProps[prop]) {\n clearTransforms = 1;\n prop = prop === \"transformOrigin\" ? _transformOriginProp : _transformProp;\n }\n\n _removeProperty(target, prop);\n }\n }\n\n if (clearTransforms) {\n _removeProperty(target, _transformProp);\n\n if (cache) {\n cache.svg && target.removeAttribute(\"transform\");\n\n _parseTransform(target, 1); // force all the cached values back to \"normal\"/identity, otherwise if there's another tween that's already set to render transforms on this element, it could display the wrong values.\n\n\n cache.uncache = 1;\n\n _removeIndependentTransforms(style);\n }\n }\n }\n},\n // note: specialProps should return 1 if (and only if) they have a non-zero priority. It indicates we need to sort the linked list.\n_specialProps = {\n clearProps: function clearProps(plugin, target, property, endValue, tween) {\n if (tween.data !== \"isFromStart\") {\n var pt = plugin._pt = new PropTween(plugin._pt, target, property, 0, 0, _renderClearProps);\n pt.u = endValue;\n pt.pr = -10;\n pt.tween = tween;\n\n plugin._props.push(property);\n\n return 1;\n }\n }\n /* className feature (about 0.4kb gzipped).\n , className(plugin, target, property, endValue, tween) {\n \tlet _renderClassName = (ratio, data) => {\n \t\t\tdata.css.render(ratio, data.css);\n \t\t\tif (!ratio || ratio === 1) {\n \t\t\t\tlet inline = data.rmv,\n \t\t\t\t\ttarget = data.t,\n \t\t\t\t\tp;\n \t\t\t\ttarget.setAttribute(\"class\", ratio ? data.e : data.b);\n \t\t\t\tfor (p in inline) {\n \t\t\t\t\t_removeProperty(target, p);\n \t\t\t\t}\n \t\t\t}\n \t\t},\n \t\t_getAllStyles = (target) => {\n \t\t\tlet styles = {},\n \t\t\t\tcomputed = getComputedStyle(target),\n \t\t\t\tp;\n \t\t\tfor (p in computed) {\n \t\t\t\tif (isNaN(p) && p !== \"cssText\" && p !== \"length\") {\n \t\t\t\t\tstyles[p] = computed[p];\n \t\t\t\t}\n \t\t\t}\n \t\t\t_setDefaults(styles, _parseTransform(target, 1));\n \t\t\treturn styles;\n \t\t},\n \t\tstartClassList = target.getAttribute(\"class\"),\n \t\tstyle = target.style,\n \t\tcssText = style.cssText,\n \t\tcache = target._gsap,\n \t\tclassPT = cache.classPT,\n \t\tinlineToRemoveAtEnd = {},\n \t\tdata = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== \"=\") ? endValue : startClassList.replace(new RegExp(\"(?:\\\\s|^)\" + endValue.substr(2) + \"(?![\\\\w-])\"), \"\") + ((endValue.charAt(0) === \"+\") ? \" \" + endValue.substr(2) : \"\")},\n \t\tchangingVars = {},\n \t\tstartVars = _getAllStyles(target),\n \t\ttransformRelated = /(transform|perspective)/i,\n \t\tendVars, p;\n \tif (classPT) {\n \t\tclassPT.r(1, classPT.d);\n \t\t_removeLinkedListItem(classPT.d.plugin, classPT, \"_pt\");\n \t}\n \ttarget.setAttribute(\"class\", data.e);\n \tendVars = _getAllStyles(target, true);\n \ttarget.setAttribute(\"class\", startClassList);\n \tfor (p in endVars) {\n \t\tif (endVars[p] !== startVars[p] && !transformRelated.test(p)) {\n \t\t\tchangingVars[p] = endVars[p];\n \t\t\tif (!style[p] && style[p] !== \"0\") {\n \t\t\t\tinlineToRemoveAtEnd[p] = 1;\n \t\t\t}\n \t\t}\n \t}\n \tcache.classPT = plugin._pt = new PropTween(plugin._pt, target, \"className\", 0, 0, _renderClassName, data, 0, -11);\n \tif (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://gsap.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.\n \t\tstyle.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).\n \t}\n \t_parseTransform(target, true); //to clear the caching of transforms\n \tdata.css = new gsap.plugins.css();\n \tdata.css.init(target, changingVars, tween);\n \tplugin._props.push(...data.css._props);\n \treturn 1;\n }\n */\n\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * TRANSFORMS\n * --------------------------------------------------------------------------------------\n */\n_identity2DMatrix = [1, 0, 0, 1, 0, 0],\n _rotationalProperties = {},\n _isNullTransform = function _isNullTransform(value) {\n return value === \"matrix(1, 0, 0, 1, 0, 0)\" || value === \"none\" || !value;\n},\n _getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray(target) {\n var matrixString = _getComputedProperty(target, _transformProp);\n\n return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_numExp).map(_round);\n},\n _getMatrix = function _getMatrix(target, force2D) {\n var cache = target._gsap || _getCache(target),\n style = target.style,\n matrix = _getComputedTransformMatrixAsArray(target),\n parent,\n nextSibling,\n temp,\n addedToDOM;\n\n if (cache.svg && target.getAttribute(\"transform\")) {\n temp = target.transform.baseVal.consolidate().matrix; //ensures that even complex values like \"translate(50,60) rotate(135,0,0)\" are parsed because it mashes it into a matrix.\n\n matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f];\n return matrix.join(\",\") === \"1,0,0,1,0,0\" ? _identity2DMatrix : matrix;\n } else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) {\n //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not \"none\". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).\n temp = style.display;\n style.display = \"block\";\n parent = target.parentNode;\n\n if (!parent || !target.offsetParent) {\n // note: in 3.3.0 we switched target.offsetParent to _doc.body.contains(target) to avoid [sometimes unnecessary] MutationObserver calls but that wasn't adequate because there are edge cases where nested position: fixed elements need to get reparented to accurately sense transforms. See https://github.com/greensock/GSAP/issues/388 and https://github.com/greensock/GSAP/issues/375\n addedToDOM = 1; //flag\n\n nextSibling = target.nextElementSibling;\n\n _docElement.appendChild(target); //we must add it to the DOM in order to get values properly\n\n }\n\n matrix = _getComputedTransformMatrixAsArray(target);\n temp ? style.display = temp : _removeProperty(target, \"display\");\n\n if (addedToDOM) {\n nextSibling ? parent.insertBefore(target, nextSibling) : parent ? parent.appendChild(target) : _docElement.removeChild(target);\n }\n }\n\n return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix;\n},\n _applySVGOrigin = function _applySVGOrigin(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) {\n var cache = target._gsap,\n matrix = matrixArray || _getMatrix(target, true),\n xOriginOld = cache.xOrigin || 0,\n yOriginOld = cache.yOrigin || 0,\n xOffsetOld = cache.xOffset || 0,\n yOffsetOld = cache.yOffset || 0,\n a = matrix[0],\n b = matrix[1],\n c = matrix[2],\n d = matrix[3],\n tx = matrix[4],\n ty = matrix[5],\n originSplit = origin.split(\" \"),\n xOrigin = parseFloat(originSplit[0]) || 0,\n yOrigin = parseFloat(originSplit[1]) || 0,\n bounds,\n determinant,\n x,\n y;\n\n if (!originIsAbsolute) {\n bounds = _getBBox(target);\n xOrigin = bounds.x + (~originSplit[0].indexOf(\"%\") ? xOrigin / 100 * bounds.width : xOrigin);\n yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf(\"%\") ? yOrigin / 100 * bounds.height : yOrigin); // if (!(\"xOrigin\" in cache) && (xOrigin || yOrigin)) { // added in 3.12.3, reverted in 3.12.4; requires more exploration\n // \txOrigin -= bounds.x;\n // \tyOrigin -= bounds.y;\n // }\n } else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) {\n //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero.\n x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant;\n y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant;\n xOrigin = x;\n yOrigin = y; // theory: we only had to do this for smoothing and it assumes that the previous one was not originIsAbsolute.\n }\n\n if (smooth || smooth !== false && cache.smooth) {\n tx = xOrigin - xOriginOld;\n ty = yOrigin - yOriginOld;\n cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx;\n cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty;\n } else {\n cache.xOffset = cache.yOffset = 0;\n }\n\n cache.xOrigin = xOrigin;\n cache.yOrigin = yOrigin;\n cache.smooth = !!smooth;\n cache.origin = origin;\n cache.originIsAbsolute = !!originIsAbsolute;\n target.style[_transformOriginProp] = \"0px 0px\"; //otherwise, if someone sets an origin via CSS, it will likely interfere with the SVG transform attribute ones (because remember, we're baking the origin into the matrix() value).\n\n if (pluginToAddPropTweensTo) {\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"xOrigin\", xOriginOld, xOrigin);\n\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"yOrigin\", yOriginOld, yOrigin);\n\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"xOffset\", xOffsetOld, cache.xOffset);\n\n _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"yOffset\", yOffsetOld, cache.yOffset);\n }\n\n target.setAttribute(\"data-svg-origin\", xOrigin + \" \" + yOrigin);\n},\n _parseTransform = function _parseTransform(target, uncache) {\n var cache = target._gsap || new GSCache(target);\n\n if (\"x\" in cache && !uncache && !cache.uncache) {\n return cache;\n }\n\n var style = target.style,\n invertedScaleX = cache.scaleX < 0,\n px = \"px\",\n deg = \"deg\",\n cs = getComputedStyle(target),\n origin = _getComputedProperty(target, _transformOriginProp) || \"0\",\n x,\n y,\n z,\n scaleX,\n scaleY,\n rotation,\n rotationX,\n rotationY,\n skewX,\n skewY,\n perspective,\n xOrigin,\n yOrigin,\n matrix,\n angle,\n cos,\n sin,\n a,\n b,\n c,\n d,\n a12,\n a22,\n t1,\n t2,\n t3,\n a13,\n a23,\n a33,\n a42,\n a43,\n a32;\n x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0;\n scaleX = scaleY = 1;\n cache.svg = !!(target.getCTM && _isSVG(target));\n\n if (cs.translate) {\n // accommodate independent transforms by combining them into normal ones.\n if (cs.translate !== \"none\" || cs.scale !== \"none\" || cs.rotate !== \"none\") {\n style[_transformProp] = (cs.translate !== \"none\" ? \"translate3d(\" + (cs.translate + \" 0 0\").split(\" \").slice(0, 3).join(\", \") + \") \" : \"\") + (cs.rotate !== \"none\" ? \"rotate(\" + cs.rotate + \") \" : \"\") + (cs.scale !== \"none\" ? \"scale(\" + cs.scale.split(\" \").join(\",\") + \") \" : \"\") + (cs[_transformProp] !== \"none\" ? cs[_transformProp] : \"\");\n }\n\n style.scale = style.rotate = style.translate = \"none\";\n }\n\n matrix = _getMatrix(target, cache.svg);\n\n if (cache.svg) {\n if (cache.uncache) {\n // if cache.uncache is true (and maybe if origin is 0,0), we need to set element.style.transformOrigin = (cache.xOrigin - bbox.x) + \"px \" + (cache.yOrigin - bbox.y) + \"px\". Previously we let the data-svg-origin stay instead, but when introducing revert(), it complicated things.\n t2 = target.getBBox();\n origin = cache.xOrigin - t2.x + \"px \" + (cache.yOrigin - t2.y) + \"px\";\n t1 = \"\";\n } else {\n t1 = !uncache && target.getAttribute(\"data-svg-origin\"); // Remember, to work around browser inconsistencies we always force SVG elements' transformOrigin to 0,0 and offset the translation accordingly.\n }\n\n _applySVGOrigin(target, t1 || origin, !!t1 || cache.originIsAbsolute, cache.smooth !== false, matrix);\n }\n\n xOrigin = cache.xOrigin || 0;\n yOrigin = cache.yOrigin || 0;\n\n if (matrix !== _identity2DMatrix) {\n a = matrix[0]; //a11\n\n b = matrix[1]; //a21\n\n c = matrix[2]; //a31\n\n d = matrix[3]; //a41\n\n x = a12 = matrix[4];\n y = a22 = matrix[5]; //2D matrix\n\n if (matrix.length === 6) {\n scaleX = Math.sqrt(a * a + b * b);\n scaleY = Math.sqrt(d * d + c * c);\n rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).\n\n skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0;\n skewX && (scaleY *= Math.abs(Math.cos(skewX * _DEG2RAD)));\n\n if (cache.svg) {\n x -= xOrigin - (xOrigin * a + yOrigin * c);\n y -= yOrigin - (xOrigin * b + yOrigin * d);\n } //3D matrix\n\n } else {\n a32 = matrix[6];\n a42 = matrix[7];\n a13 = matrix[8];\n a23 = matrix[9];\n a33 = matrix[10];\n a43 = matrix[11];\n x = matrix[12];\n y = matrix[13];\n z = matrix[14];\n angle = _atan2(a32, a33);\n rotationX = angle * _RAD2DEG; //rotationX\n\n if (angle) {\n cos = Math.cos(-angle);\n sin = Math.sin(-angle);\n t1 = a12 * cos + a13 * sin;\n t2 = a22 * cos + a23 * sin;\n t3 = a32 * cos + a33 * sin;\n a13 = a12 * -sin + a13 * cos;\n a23 = a22 * -sin + a23 * cos;\n a33 = a32 * -sin + a33 * cos;\n a43 = a42 * -sin + a43 * cos;\n a12 = t1;\n a22 = t2;\n a32 = t3;\n } //rotationY\n\n\n angle = _atan2(-c, a33);\n rotationY = angle * _RAD2DEG;\n\n if (angle) {\n cos = Math.cos(-angle);\n sin = Math.sin(-angle);\n t1 = a * cos - a13 * sin;\n t2 = b * cos - a23 * sin;\n t3 = c * cos - a33 * sin;\n a43 = d * sin + a43 * cos;\n a = t1;\n b = t2;\n c = t3;\n } //rotationZ\n\n\n angle = _atan2(b, a);\n rotation = angle * _RAD2DEG;\n\n if (angle) {\n cos = Math.cos(angle);\n sin = Math.sin(angle);\n t1 = a * cos + b * sin;\n t2 = a12 * cos + a22 * sin;\n b = b * cos - a * sin;\n a22 = a22 * cos - a12 * sin;\n a = t1;\n a12 = t2;\n }\n\n if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) {\n //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.\n rotationX = rotation = 0;\n rotationY = 180 - rotationY;\n }\n\n scaleX = _round(Math.sqrt(a * a + b * b + c * c));\n scaleY = _round(Math.sqrt(a22 * a22 + a32 * a32));\n angle = _atan2(a12, a22);\n skewX = Math.abs(angle) > 0.0002 ? angle * _RAD2DEG : 0;\n perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0;\n }\n\n if (cache.svg) {\n //sense if there are CSS transforms applied on an SVG element in which case we must overwrite them when rendering. The transform attribute is more reliable cross-browser, but we can't just remove the CSS ones because they may be applied in a CSS rule somewhere (not just inline).\n t1 = target.getAttribute(\"transform\");\n cache.forceCSS = target.setAttribute(\"transform\", \"\") || !_isNullTransform(_getComputedProperty(target, _transformProp));\n t1 && target.setAttribute(\"transform\", t1);\n }\n }\n\n if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {\n if (invertedScaleX) {\n scaleX *= -1;\n skewX += rotation <= 0 ? 180 : -180;\n rotation += rotation <= 0 ? 180 : -180;\n } else {\n scaleY *= -1;\n skewX += skewX <= 0 ? 180 : -180;\n }\n }\n\n uncache = uncache || cache.uncache;\n cache.x = x - ((cache.xPercent = x && (!uncache && cache.xPercent || (Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0))) ? target.offsetWidth * cache.xPercent / 100 : 0) + px;\n cache.y = y - ((cache.yPercent = y && (!uncache && cache.yPercent || (Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0))) ? target.offsetHeight * cache.yPercent / 100 : 0) + px;\n cache.z = z + px;\n cache.scaleX = _round(scaleX);\n cache.scaleY = _round(scaleY);\n cache.rotation = _round(rotation) + deg;\n cache.rotationX = _round(rotationX) + deg;\n cache.rotationY = _round(rotationY) + deg;\n cache.skewX = skewX + deg;\n cache.skewY = skewY + deg;\n cache.transformPerspective = perspective + px;\n\n if (cache.zOrigin = parseFloat(origin.split(\" \")[2]) || !uncache && cache.zOrigin || 0) {\n style[_transformOriginProp] = _firstTwoOnly(origin);\n }\n\n cache.xOffset = cache.yOffset = 0;\n cache.force3D = _config.force3D;\n cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms;\n cache.uncache = 0;\n return cache;\n},\n _firstTwoOnly = function _firstTwoOnly(value) {\n return (value = value.split(\" \"))[0] + \" \" + value[1];\n},\n //for handling transformOrigin values, stripping out the 3rd dimension\n_addPxTranslate = function _addPxTranslate(target, start, value) {\n var unit = getUnit(start);\n return _round(parseFloat(start) + parseFloat(_convertToUnit(target, \"x\", value + \"px\", unit))) + unit;\n},\n _renderNon3DTransforms = function _renderNon3DTransforms(ratio, cache) {\n cache.z = \"0px\";\n cache.rotationY = cache.rotationX = \"0deg\";\n cache.force3D = 0;\n\n _renderCSSTransforms(ratio, cache);\n},\n _zeroDeg = \"0deg\",\n _zeroPx = \"0px\",\n _endParenthesis = \") \",\n _renderCSSTransforms = function _renderCSSTransforms(ratio, cache) {\n var _ref = cache || this,\n xPercent = _ref.xPercent,\n yPercent = _ref.yPercent,\n x = _ref.x,\n y = _ref.y,\n z = _ref.z,\n rotation = _ref.rotation,\n rotationY = _ref.rotationY,\n rotationX = _ref.rotationX,\n skewX = _ref.skewX,\n skewY = _ref.skewY,\n scaleX = _ref.scaleX,\n scaleY = _ref.scaleY,\n transformPerspective = _ref.transformPerspective,\n force3D = _ref.force3D,\n target = _ref.target,\n zOrigin = _ref.zOrigin,\n transforms = \"\",\n use3D = force3D === \"auto\" && ratio && ratio !== 1 || force3D === true; // Safari has a bug that causes it not to render 3D transform-origin values properly, so we force the z origin to 0, record it in the cache, and then do the math here to offset the translate values accordingly (basically do the 3D transform-origin part manually)\n\n\n if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) {\n var angle = parseFloat(rotationY) * _DEG2RAD,\n a13 = Math.sin(angle),\n a33 = Math.cos(angle),\n cos;\n\n angle = parseFloat(rotationX) * _DEG2RAD;\n cos = Math.cos(angle);\n x = _addPxTranslate(target, x, a13 * cos * -zOrigin);\n y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin);\n z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin);\n }\n\n if (transformPerspective !== _zeroPx) {\n transforms += \"perspective(\" + transformPerspective + _endParenthesis;\n }\n\n if (xPercent || yPercent) {\n transforms += \"translate(\" + xPercent + \"%, \" + yPercent + \"%) \";\n }\n\n if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) {\n transforms += z !== _zeroPx || use3D ? \"translate3d(\" + x + \", \" + y + \", \" + z + \") \" : \"translate(\" + x + \", \" + y + _endParenthesis;\n }\n\n if (rotation !== _zeroDeg) {\n transforms += \"rotate(\" + rotation + _endParenthesis;\n }\n\n if (rotationY !== _zeroDeg) {\n transforms += \"rotateY(\" + rotationY + _endParenthesis;\n }\n\n if (rotationX !== _zeroDeg) {\n transforms += \"rotateX(\" + rotationX + _endParenthesis;\n }\n\n if (skewX !== _zeroDeg || skewY !== _zeroDeg) {\n transforms += \"skew(\" + skewX + \", \" + skewY + _endParenthesis;\n }\n\n if (scaleX !== 1 || scaleY !== 1) {\n transforms += \"scale(\" + scaleX + \", \" + scaleY + _endParenthesis;\n }\n\n target.style[_transformProp] = transforms || \"translate(0, 0)\";\n},\n _renderSVGTransforms = function _renderSVGTransforms(ratio, cache) {\n var _ref2 = cache || this,\n xPercent = _ref2.xPercent,\n yPercent = _ref2.yPercent,\n x = _ref2.x,\n y = _ref2.y,\n rotation = _ref2.rotation,\n skewX = _ref2.skewX,\n skewY = _ref2.skewY,\n scaleX = _ref2.scaleX,\n scaleY = _ref2.scaleY,\n target = _ref2.target,\n xOrigin = _ref2.xOrigin,\n yOrigin = _ref2.yOrigin,\n xOffset = _ref2.xOffset,\n yOffset = _ref2.yOffset,\n forceCSS = _ref2.forceCSS,\n tx = parseFloat(x),\n ty = parseFloat(y),\n a11,\n a21,\n a12,\n a22,\n temp;\n\n rotation = parseFloat(rotation);\n skewX = parseFloat(skewX);\n skewY = parseFloat(skewY);\n\n if (skewY) {\n //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees.\n skewY = parseFloat(skewY);\n skewX += skewY;\n rotation += skewY;\n }\n\n if (rotation || skewX) {\n rotation *= _DEG2RAD;\n skewX *= _DEG2RAD;\n a11 = Math.cos(rotation) * scaleX;\n a21 = Math.sin(rotation) * scaleX;\n a12 = Math.sin(rotation - skewX) * -scaleY;\n a22 = Math.cos(rotation - skewX) * scaleY;\n\n if (skewX) {\n skewY *= _DEG2RAD;\n temp = Math.tan(skewX - skewY);\n temp = Math.sqrt(1 + temp * temp);\n a12 *= temp;\n a22 *= temp;\n\n if (skewY) {\n temp = Math.tan(skewY);\n temp = Math.sqrt(1 + temp * temp);\n a11 *= temp;\n a21 *= temp;\n }\n }\n\n a11 = _round(a11);\n a21 = _round(a21);\n a12 = _round(a12);\n a22 = _round(a22);\n } else {\n a11 = scaleX;\n a22 = scaleY;\n a21 = a12 = 0;\n }\n\n if (tx && !~(x + \"\").indexOf(\"px\") || ty && !~(y + \"\").indexOf(\"px\")) {\n tx = _convertToUnit(target, \"x\", x, \"px\");\n ty = _convertToUnit(target, \"y\", y, \"px\");\n }\n\n if (xOrigin || yOrigin || xOffset || yOffset) {\n tx = _round(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset);\n ty = _round(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset);\n }\n\n if (xPercent || yPercent) {\n //The SVG spec doesn't support percentage-based translation in the \"transform\" attribute, so we merge it into the translation to simulate it.\n temp = target.getBBox();\n tx = _round(tx + xPercent / 100 * temp.width);\n ty = _round(ty + yPercent / 100 * temp.height);\n }\n\n temp = \"matrix(\" + a11 + \",\" + a21 + \",\" + a12 + \",\" + a22 + \",\" + tx + \",\" + ty + \")\";\n target.setAttribute(\"transform\", temp);\n forceCSS && (target.style[_transformProp] = temp); //some browsers prioritize CSS transforms over the transform attribute. When we sense that the user has CSS transforms applied, we must overwrite them this way (otherwise some browser simply won't render the transform attribute changes!)\n},\n _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue) {\n var cap = 360,\n isString = _isString(endValue),\n endNum = parseFloat(endValue) * (isString && ~endValue.indexOf(\"rad\") ? _RAD2DEG : 1),\n change = endNum - startNum,\n finalValue = startNum + change + \"deg\",\n direction,\n pt;\n\n if (isString) {\n direction = endValue.split(\"_\")[1];\n\n if (direction === \"short\") {\n change %= cap;\n\n if (change !== change % (cap / 2)) {\n change += change < 0 ? cap : -cap;\n }\n }\n\n if (direction === \"cw\" && change < 0) {\n change = (change + cap * _bigNum) % cap - ~~(change / cap) * cap;\n } else if (direction === \"ccw\" && change > 0) {\n change = (change - cap * _bigNum) % cap - ~~(change / cap) * cap;\n }\n }\n\n plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd);\n pt.e = finalValue;\n pt.u = \"deg\";\n\n plugin._props.push(property);\n\n return pt;\n},\n _assign = function _assign(target, source) {\n // Internet Explorer doesn't have Object.assign(), so we recreate it here.\n for (var p in source) {\n target[p] = source[p];\n }\n\n return target;\n},\n _addRawTransformPTs = function _addRawTransformPTs(plugin, transforms, target) {\n //for handling cases where someone passes in a whole transform string, like transform: \"scale(2, 3) rotate(20deg) translateY(30em)\"\n var startCache = _assign({}, target._gsap),\n exclude = \"perspective,force3D,transformOrigin,svgOrigin\",\n style = target.style,\n endCache,\n p,\n startValue,\n endValue,\n startNum,\n endNum,\n startUnit,\n endUnit;\n\n if (startCache.svg) {\n startValue = target.getAttribute(\"transform\");\n target.setAttribute(\"transform\", \"\");\n style[_transformProp] = transforms;\n endCache = _parseTransform(target, 1);\n\n _removeProperty(target, _transformProp);\n\n target.setAttribute(\"transform\", startValue);\n } else {\n startValue = getComputedStyle(target)[_transformProp];\n style[_transformProp] = transforms;\n endCache = _parseTransform(target, 1);\n style[_transformProp] = startValue;\n }\n\n for (p in _transformProps) {\n startValue = startCache[p];\n endValue = endCache[p];\n\n if (startValue !== endValue && exclude.indexOf(p) < 0) {\n //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.\n startUnit = getUnit(startValue);\n endUnit = getUnit(endValue);\n startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue);\n endNum = parseFloat(endValue);\n plugin._pt = new PropTween(plugin._pt, endCache, p, startNum, endNum - startNum, _renderCSSProp);\n plugin._pt.u = endUnit || 0;\n\n plugin._props.push(p);\n }\n }\n\n _assign(endCache, startCache);\n}; // handle splitting apart padding, margin, borderWidth, and borderRadius into their 4 components. Firefox, for example, won't report borderRadius correctly - it will only do borderTopLeftRadius and the other corners. We also want to handle paddingTop, marginLeft, borderRightWidth, etc.\n\n\n_forEachName(\"padding,margin,Width,Radius\", function (name, index) {\n var t = \"Top\",\n r = \"Right\",\n b = \"Bottom\",\n l = \"Left\",\n props = (index < 3 ? [t, r, b, l] : [t + l, t + r, b + r, b + l]).map(function (side) {\n return index < 2 ? name + side : \"border\" + side + name;\n });\n\n _specialProps[index > 1 ? \"border\" + name : name] = function (plugin, target, property, endValue, tween) {\n var a, vars;\n\n if (arguments.length < 4) {\n // getter, passed target, property, and unit (from _get())\n a = props.map(function (prop) {\n return _get(plugin, prop, property);\n });\n vars = a.join(\" \");\n return vars.split(a[0]).length === 5 ? a[0] : vars;\n }\n\n a = (endValue + \"\").split(\" \");\n vars = {};\n props.forEach(function (prop, i) {\n return vars[prop] = a[i] = a[i] || a[(i - 1) / 2 | 0];\n });\n plugin.init(target, vars, tween);\n };\n});\n\nexport var CSSPlugin = {\n name: \"css\",\n register: _initCore,\n targetTest: function targetTest(target) {\n return target.style && target.nodeType;\n },\n init: function init(target, vars, tween, index, targets) {\n var props = this._props,\n style = target.style,\n startAt = tween.vars.startAt,\n startValue,\n endValue,\n endNum,\n startNum,\n type,\n specialProp,\n p,\n startUnit,\n endUnit,\n relative,\n isTransformRelated,\n transformPropTween,\n cache,\n smooth,\n hasPriority,\n inlineProps;\n _pluginInitted || _initCore(); // we may call init() multiple times on the same plugin instance, like when adding special properties, so make sure we don't overwrite the revert data or inlineProps\n\n this.styles = this.styles || _getStyleSaver(target);\n inlineProps = this.styles.props;\n this.tween = tween;\n\n for (p in vars) {\n if (p === \"autoRound\") {\n continue;\n }\n\n endValue = vars[p];\n\n if (_plugins[p] && _checkPlugin(p, vars, tween, index, target, targets)) {\n // plugins\n continue;\n }\n\n type = typeof endValue;\n specialProp = _specialProps[p];\n\n if (type === \"function\") {\n endValue = endValue.call(tween, index, target, targets);\n type = typeof endValue;\n }\n\n if (type === \"string\" && ~endValue.indexOf(\"random(\")) {\n endValue = _replaceRandom(endValue);\n }\n\n if (specialProp) {\n specialProp(this, target, p, endValue, tween) && (hasPriority = 1);\n } else if (p.substr(0, 2) === \"--\") {\n //CSS variable\n startValue = (getComputedStyle(target).getPropertyValue(p) + \"\").trim();\n endValue += \"\";\n _colorExp.lastIndex = 0;\n\n if (!_colorExp.test(startValue)) {\n // colors don't have units\n startUnit = getUnit(startValue);\n endUnit = getUnit(endValue);\n }\n\n endUnit ? startUnit !== endUnit && (startValue = _convertToUnit(target, p, startValue, endUnit) + endUnit) : startUnit && (endValue += startUnit);\n this.add(style, \"setProperty\", startValue, endValue, index, targets, 0, 0, p);\n props.push(p);\n inlineProps.push(p, 0, style[p]);\n } else if (type !== \"undefined\") {\n if (startAt && p in startAt) {\n // in case someone hard-codes a complex value as the start, like top: \"calc(2vh / 2)\". Without this, it'd use the computed value (always in px)\n startValue = typeof startAt[p] === \"function\" ? startAt[p].call(tween, index, target, targets) : startAt[p];\n _isString(startValue) && ~startValue.indexOf(\"random(\") && (startValue = _replaceRandom(startValue));\n getUnit(startValue + \"\") || startValue === \"auto\" || (startValue += _config.units[p] || getUnit(_get(target, p)) || \"\"); // for cases when someone passes in a unitless value like {x: 100}; if we try setting translate(100, 0px) it won't work.\n\n (startValue + \"\").charAt(1) === \"=\" && (startValue = _get(target, p)); // can't work with relative values\n } else {\n startValue = _get(target, p);\n }\n\n startNum = parseFloat(startValue);\n relative = type === \"string\" && endValue.charAt(1) === \"=\" && endValue.substr(0, 2);\n relative && (endValue = endValue.substr(2));\n endNum = parseFloat(endValue);\n\n if (p in _propertyAliases) {\n if (p === \"autoAlpha\") {\n //special case where we control the visibility along with opacity. We still allow the opacity value to pass through and get tweened.\n if (startNum === 1 && _get(target, \"visibility\") === \"hidden\" && endNum) {\n //if visibility is initially set to \"hidden\", we should interpret that as intent to make opacity 0 (a convenience)\n startNum = 0;\n }\n\n inlineProps.push(\"visibility\", 0, style.visibility);\n\n _addNonTweeningPT(this, style, \"visibility\", startNum ? \"inherit\" : \"hidden\", endNum ? \"inherit\" : \"hidden\", !endNum);\n }\n\n if (p !== \"scale\" && p !== \"transform\") {\n p = _propertyAliases[p];\n ~p.indexOf(\",\") && (p = p.split(\",\")[0]);\n }\n }\n\n isTransformRelated = p in _transformProps; //--- TRANSFORM-RELATED ---\n\n if (isTransformRelated) {\n this.styles.save(p);\n\n if (!transformPropTween) {\n cache = target._gsap;\n cache.renderTransform && !vars.parseTransform || _parseTransform(target, vars.parseTransform); // if, for example, gsap.set(... {transform:\"translateX(50vw)\"}), the _get() call doesn't parse the transform, thus cache.renderTransform won't be set yet so force the parsing of the transform here.\n\n smooth = vars.smoothOrigin !== false && cache.smooth;\n transformPropTween = this._pt = new PropTween(this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1); //the first time through, create the rendering PropTween so that it runs LAST (in the linked list, we keep adding to the beginning)\n\n transformPropTween.dep = 1; //flag it as dependent so that if things get killed/overwritten and this is the only PropTween left, we can safely kill the whole tween.\n }\n\n if (p === \"scale\") {\n this._pt = new PropTween(this._pt, cache, \"scaleY\", cache.scaleY, (relative ? _parseRelative(cache.scaleY, relative + endNum) : endNum) - cache.scaleY || 0, _renderCSSProp);\n this._pt.u = 0;\n props.push(\"scaleY\", p);\n p += \"X\";\n } else if (p === \"transformOrigin\") {\n inlineProps.push(_transformOriginProp, 0, style[_transformOriginProp]);\n endValue = _convertKeywordsToPercentages(endValue); //in case something like \"left top\" or \"bottom right\" is passed in. Convert to percentages.\n\n if (cache.svg) {\n _applySVGOrigin(target, endValue, 0, smooth, 0, this);\n } else {\n endUnit = parseFloat(endValue.split(\" \")[2]) || 0; //handle the zOrigin separately!\n\n endUnit !== cache.zOrigin && _addNonTweeningPT(this, cache, \"zOrigin\", cache.zOrigin, endUnit);\n\n _addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue));\n }\n\n continue;\n } else if (p === \"svgOrigin\") {\n _applySVGOrigin(target, endValue, 1, smooth, 0, this);\n\n continue;\n } else if (p in _rotationalProperties) {\n _addRotationalPropTween(this, cache, p, startNum, relative ? _parseRelative(startNum, relative + endValue) : endValue);\n\n continue;\n } else if (p === \"smoothOrigin\") {\n _addNonTweeningPT(this, cache, \"smooth\", cache.smooth, endValue);\n\n continue;\n } else if (p === \"force3D\") {\n cache[p] = endValue;\n continue;\n } else if (p === \"transform\") {\n _addRawTransformPTs(this, endValue, target);\n\n continue;\n }\n } else if (!(p in style)) {\n p = _checkPropPrefix(p) || p;\n }\n\n if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) {\n startUnit = (startValue + \"\").substr((startNum + \"\").length);\n endNum || (endNum = 0); // protect against NaN\n\n endUnit = getUnit(endValue) || (p in _config.units ? _config.units[p] : startUnit);\n startUnit !== endUnit && (startNum = _convertToUnit(target, p, startValue, endUnit));\n this._pt = new PropTween(this._pt, isTransformRelated ? cache : style, p, startNum, (relative ? _parseRelative(startNum, relative + endNum) : endNum) - startNum, !isTransformRelated && (endUnit === \"px\" || p === \"zIndex\") && vars.autoRound !== false ? _renderRoundedCSSProp : _renderCSSProp);\n this._pt.u = endUnit || 0;\n\n if (startUnit !== endUnit && endUnit !== \"%\") {\n //when the tween goes all the way back to the beginning, we need to revert it to the OLD/ORIGINAL value (with those units). We record that as a \"b\" (beginning) property and point to a render method that handles that. (performance optimization)\n this._pt.b = startValue;\n this._pt.r = _renderCSSPropWithBeginning;\n }\n } else if (!(p in style)) {\n if (p in target) {\n //maybe it's not a style - it could be a property added directly to an element in which case we'll try to animate that.\n this.add(target, p, startValue || target[p], relative ? relative + endValue : endValue, index, targets);\n } else if (p !== \"parseTransform\") {\n _missingPlugin(p, endValue);\n\n continue;\n }\n } else {\n _tweenComplexCSSString.call(this, target, p, startValue, relative ? relative + endValue : endValue);\n }\n\n isTransformRelated || (p in style ? inlineProps.push(p, 0, style[p]) : inlineProps.push(p, 1, startValue || target[p]));\n props.push(p);\n }\n }\n\n hasPriority && _sortPropTweensByPriority(this);\n },\n render: function render(ratio, data) {\n if (data.tween._time || !_reverting()) {\n var pt = data._pt;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n } else {\n data.styles.revert();\n }\n },\n get: _get,\n aliases: _propertyAliases,\n getSetter: function getSetter(target, property, plugin) {\n //returns a setter function that accepts target, property, value and applies it accordingly. Remember, properties like \"x\" aren't as simple as target.style.property = value because they've got to be applied to a proxy object and then merged into a transform string in a renderer.\n var p = _propertyAliases[property];\n p && p.indexOf(\",\") < 0 && (property = p);\n return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, \"x\")) ? plugin && _recentSetterPlugin === plugin ? property === \"scale\" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === \"scale\" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !_isUndefined(target.style[property]) ? _setterCSSStyle : ~property.indexOf(\"-\") ? _setterCSSProp : _getSetter(target, property);\n },\n core: {\n _removeProperty: _removeProperty,\n _getMatrix: _getMatrix\n }\n};\ngsap.utils.checkPrefix = _checkPropPrefix;\ngsap.core.getStyleSaver = _getStyleSaver;\n\n(function (positionAndScale, rotation, others, aliases) {\n var all = _forEachName(positionAndScale + \",\" + rotation + \",\" + others, function (name) {\n _transformProps[name] = 1;\n });\n\n _forEachName(rotation, function (name) {\n _config.units[name] = \"deg\";\n _rotationalProperties[name] = 1;\n });\n\n _propertyAliases[all[13]] = positionAndScale + \",\" + rotation;\n\n _forEachName(aliases, function (name) {\n var split = name.split(\":\");\n _propertyAliases[split[1]] = all[split[0]];\n });\n})(\"x,y,z,scale,scaleX,scaleY,xPercent,yPercent\", \"rotation,rotationX,rotationY,skewX,skewY\", \"transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective\", \"0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY\");\n\n_forEachName(\"x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective\", function (name) {\n _config.units[name] = \"px\";\n});\n\ngsap.registerPlugin(CSSPlugin);\nexport { CSSPlugin as default, _getBBox, _createElement, _checkPropPrefix as checkPrefix };","import { gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenLite, TimelineLite, TimelineMax } from \"./gsap-core.js\";\nimport { CSSPlugin } from \"./CSSPlugin.js\";\nvar gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap,\n // to protect from tree shaking\nTweenMaxWithCSS = gsapWithCSS.core.Tween;\nexport { gsapWithCSS as gsap, gsapWithCSS as default, CSSPlugin, TweenMaxWithCSS as TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ };","@use 'sass:map';\n@import '../../themes/capsule.globals';\n\n:host {\n --container-width: 560px;\n --container-gap: 8px;\n\n --card-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.08);\n\n display: block;\n z-index: calc(map.get($z-indices, 'modal') + 6);\n position: relative;\n}\n\n:host {\n cpsl-overlay {\n z-index: calc(map.get($z-indices, 'modal') + 6);\n }\n}\n\n:host(.include-mobile-styling) {\n @media (max-width: 480px) {\n .modal-wrapper {\n scale: none;\n top: 100%;\n left: 0;\n height: unset;\n opacity: 1;\n }\n\n .modal-container {\n width: 100%;\n max-width: none;\n\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n\n .modal-body-card {\n --card-border-radius-bl: 0px;\n --card-border-radius-br: 0px;\n }\n }\n}\n\n:host(.no-overlay) {\n z-index: map.get($z-indices, 'modal-no-overlay');\n\n & .modal-body-card {\n --card-border-width: 1px;\n }\n}\n\n.modal-wrapper {\n z-index: calc(map.get($z-indices, 'modal') + 6);\n position: fixed;\n top: 0;\n left: 0;\n display: none;\n height: 100%;\n width: 100%;\n justify-content: center;\n align-items: center;\n scale: 0.8;\n opacity: 0;\n transform: none;\n}\n\n.modal-container {\n position: relative;\n overflow: hidden;\n\n width: var(--container-width);\n display: flex;\n flex-direction: column;\n gap: var(--container-gap);\n\n max-width: 95vw;\n max-height: 95vh;\n max-height: 95dvh;\n overflow: auto;\n\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n /* Hide scrollbar for Chrome, Safari and Opera */\n ::-webkit-scrollbar {\n display: none;\n }\n\n &.no-footer {\n gap: 0px;\n }\n}\n\n.modal-body-card {\n --card-padding-top: 16px;\n --card-padding-bottom: 16px;\n --card-padding-start: 16px;\n --card-padding-end: 16px;\n --card-border-width: 0px;\n}\n\n.body {\n &::part(card-container) {\n box-shadow: var(--card-box-shadow);\n }\n}\n\n.no-opacity {\n opacity: 0;\n}\n\n.mobile-footer {\n margin-top: 16px;\n}\n\n.footer-hidden {\n height: 0px;\n visibility: hidden;\n\n --card-padding-top: 0px;\n --card-padding-bottom: 0px;\n --card-padding-start: 0px;\n --card-padding-end: 0px;\n --card-border-width: 0px;\n}\n","import { Component, Element, Host, Prop, State, Watch, h, Event, EventEmitter } from '@stencil/core';\nimport gsap from 'gsap';\nimport { MOBILE_SIZE } from '../../constants';\n\nconst mm = gsap.matchMedia();\n@Component({\n tag: 'cpsl-auth-modal',\n styleUrl: 'cpsl-auth-modal.scss',\n shadow: true,\n})\nexport class CpslAuthModal {\n private hasAnimatedIn: boolean;\n\n @Element() el!: HTMLCpslAuthModalElement;\n\n @State() hasFooter: boolean;\n @State() isMobile: boolean;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the overlay. This will always show the modal, regardless of the value of `open`.\n */\n @Prop() noOverlay?: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalRequestClose!: EventEmitter<null>;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n @Watch('open')\n toggleModal() {\n if (this.hasAnimatedIn) {\n this.handleAnimation();\n }\n }\n\n componentDidLoad() {\n this.handleAnimation();\n this.hasAnimatedIn = true;\n\n mm.add(`(min-width: ${MOBILE_SIZE + 1}px)`, () => {\n gsap.timeline({}).set(this.modalWrapperEl, { yPercent: 0, scale: this.open ? 1 : 0.8, opacity: this.open ? 1 : 0 });\n this.isMobile = false;\n });\n mm.add(`(max-width: ${MOBILE_SIZE}px)`, () => {\n gsap.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });\n this.isMobile = true;\n });\n\n this.hasFooter = this.footerSlotEl.assignedNodes().length >= 1;\n this.footerSlotEl.addEventListener('slotchange', () => {\n if (this.footerSlotEl.assignedNodes().length >= 1) {\n this.hasFooter = true;\n } else {\n this.hasFooter = false;\n }\n });\n }\n\n private handleAnimation() {\n if (this.open) {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', yPercent: 0 })\n .to(this.modalWrapperEl, {\n scale: 1,\n opacity: 1,\n duration: this.enterTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', scale: 1, opacity: 1 })\n .to(this.modalWrapperEl, {\n yPercent: -100,\n duration: this.enterTransitionDuration,\n });\n }\n } else {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n scale: 0.8,\n opacity: 0,\n duration: this.exitTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n yPercent: 0,\n duration: this.exitTransitionDuration,\n })\n .set(this.modalContainerEl, { y: 0 });\n }\n }\n }\n\n private get footerEl() {\n return this.el.shadowRoot.getElementById('modal-footer');\n }\n\n private get modalWrapperEl() {\n return this.el.shadowRoot.getElementById('modal-wrapper');\n }\n\n private get modalContainerEl() {\n return this.el.shadowRoot.getElementById('modal-container');\n }\n\n private get footerSlotEl() {\n return this.footerEl.querySelectorAll('slot')[0];\n }\n\n private get Modal() {\n return (\n <div class={{ 'modal-container': true, 'no-footer': !this.hasFooter }} part=\"modal-container\" id=\"modal-container\">\n <cpsl-card id=\"modal-body-card\" class={{ 'modal-body-card': true, 'body': true }} part=\"modal-body-card\">\n <slot name=\"body\"></slot>\n {this.isMobile && (\n <div class=\"mobile-footer\">\n <slot name=\"footer\"></slot>\n </div>\n )}\n </cpsl-card>\n <cpsl-card\n id=\"modal-footer\"\n part=\"modal-footer\"\n class={{ 'footer-hidden': !this.hasFooter, 'modal-body-card': true }}\n style={{ display: !this.isMobile ? 'block' : 'none' }}\n >\n <slot name=\"footer\"></slot>\n </cpsl-card>\n </div>\n );\n }\n\n render() {\n if (this.noOverlay) {\n return (\n <Host style={this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}} class=\"no-overlay\">\n {this.Modal}\n </Host>\n );\n }\n\n return (\n <Host style={this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}} class={{ 'include-mobile-styling': true }}>\n <cpsl-overlay\n zIndexOverride={this.zIndexOverride ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n <div id=\"modal-wrapper\" class=\"modal-wrapper\">\n {this.Modal}\n </div>\n </Host>\n );\n }\n}\n",":host {\n --container-border-color: var(--cpsl-color-avatar-border);\n --container-border-width: 1px;\n --container-border-radius: var(--cpsl-border-radius-avatar);\n --container-background-color: var(--cpsl-color-avatar-surface);\n --container-padding: 4px;\n --container-height: 40px;\n --container-width: 40px;\n\n display: block;\n height: 100%;\n width: 100%;\n}\n\nspan {\n display: inline-block;\n height: var(--container-height);\n width: var(--container-width);\n border: var(--container-border-width) solid var(--container-border-color);\n border-radius: var(--container-border-radius);\n padding: var(--container-padding);\n background-color: var(--container-background-color);\n\n &.round {\n border-radius: 1000px;\n }\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-avatar',\n styleUrl: 'cpsl-avatar.scss',\n shadow: true,\n})\nexport class CpslAvatar {\n /**\n * The alternate text for the avatar image.\n */\n @Prop() alt?: string;\n\n /**\n * The source of the avatar image.\n */\n @Prop() src: string;\n\n /**\n * The variant of the avatar.\n * Options are: `\"round\"`, `\"square\".\n * Default is: `\"square\"`.\n */\n @Prop() variant?: 'round' | 'square' = 'square';\n\n render() {\n return (\n <Host>\n <span class={{ round: this.variant === 'round' }}>\n <img src={this.src} alt={this.alt ?? 'avatar'} />\n </span>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --button-border-width: 1px;\n --button-border-width-start: var(--button-border-width);\n --button-border-width-end: var(--button-border-width);\n --button-border-width-top: var(--button-border-width);\n --button-border-width-bottom: var(--button-border-width);\n --button-gap: 8px;\n --button-justify-content: center;\n --button-border-radius-top-start: var(--button-border-radius);\n --button-border-radius-top-end: var(--button-border-radius);\n --button-border-radius-bottom-end: var(--button-border-radius);\n --button-border-radius-bottom-start: var(--button-border-radius);\n --button-padding-start: 16px;\n --button-padding-end: 16px;\n --button-icon-size: var(--cpls-font-size-body-l);\n --button-font-weight: 500;\n\n // ******\n // PRIMARY BUTTON\n // ******\n // DEFAULT\n --button-primary-color: var(--cpsl-color-primary-button-text);\n --button-primary-background-color: var(--cpsl-color-primary-button-surface-default);\n --button-primary-border-color: var(--cpsl-color-primary-button-border-default);\n --button-primary-icon-color: var(--cpsl-color-primary-button-text);\n // DISABLED\n --button-primary-disabled-color: var(--cpsl-color-text-disabled);\n --button-primary-disabled-background-color: var(--cpsl-color-primary-button-surface-disabled);\n --button-primary-disabled-border-color: var(--cpsl-color-primary-button-border-disabled);\n --button-primary-disabled-icon-color: var(--cpsl-color-text-disabled);\n // HOVER\n --button-primary-hover-color: var(--cpsl-color-primary-button-text);\n --button-primary-hover-background-color: var(--cpsl-color-primary-button-surface-hover);\n --button-primary-hover-border-color: var(--cpsl-color-primary-button-surface-hover);\n --button-primary-hover-icon-color: var(--cpsl-color-primary-button-text);\n // ACTIVE\n --button-primary-active-color: var(--cpsl-color-primary-button-text);\n --button-primary-active-background-color: var(--cpsl-color-primary-button-surface-pressed);\n --button-primary-active-border-color: var(--cpsl-color-primary-button-surface-pressed);\n --button-primary-active-icon-color: var(--cpsl-color-primary-button-text);\n\n // ******\n // SECONDARY BUTTON\n // ******\n // DEFAULT\n --button-secondary-color: var(--cpsl-color-secondary-button-text);\n --button-secondary-background-color: var(--cpsl-color-secondary-button-surface-default);\n --button-secondary-border-color: var(--cpsl-color-secondary-button-border-default);\n --button-secondary-icon-color: var(--cpsl-color-secondary-button-text);\n // DISABLED\n --button-secondary-disabled-color: var(--cpsl-color-text-disabled);\n --button-secondary-disabled-background-color: var(--cpsl-color-secondary-button-surface-disabled);\n --button-secondary-disabled-border-color: var(--cpsl-color-secondary-button-border-disabled);\n --button-secondary-disabled-icon-color: var(--cpsl-color-secondary-button-text);\n // HOVER\n --button-secondary-hover-color: var(--cpsl-color-secondary-button-text);\n --button-secondary-hover-background-color: var(--cpsl-color-secondary-button-surface-hover);\n --button-secondary-hover-border-color: var(--cpsl-color-secondary-button-border-default);\n --button-secondary-hover-icon-color: var(--cpsl-color-secondary-button-text);\n // ACTIVE\n --button-secondary-active-color: var(--cpsl-color-secondary-button-text);\n --button-secondary-active-background-color: var(--cpsl-color-secondary-button-surface-pressed);\n --button-secondary-active-border-color: var(--cpsl-color-secondary-button-border-default);\n --button-secondary-active-icon-color: var(--cpsl-color-secondary-button-text);\n\n // ******\n // TERTIARY BUTTON\n // ******\n // DEFAULT\n --button-tertiary-color: var(--cpsl-color-tertiary-button-text);\n --button-tertiary-background-color: var(--cpsl-color-tertiary-button-surface-default);\n --button-tertiary-border-color: var(--cpsl-color-tertiary-button-border-default);\n --button-tertiary-icon-color: var(--cpsl-color-tertiary-button-text);\n // DISABLED\n --button-tertiary-disabled-color: var(--cpsl-color-text-disabled);\n --button-tertiary-disabled-background-color: var(--cpsl-color-tertiary-button-surface-disabled);\n --button-tertiary-disabled-border-color: var(--cpsl-color-tertiary-button-border-disabled);\n --button-tertiary-disabled-icon-color: var(--cpsl-color-tertiary-button-text);\n // HOVER\n --button-tertiary-hover-color: var(--cpsl-color-tertiary-button-text);\n --button-tertiary-hover-background-color: var(--cpsl-color-tertiary-button-surface-hover);\n --button-tertiary-hover-border-color: var(--cpsl-color-tertiary-button-surface-hover);\n --button-tertiary-hover-icon-color: var(--cpsl-color-tertiary-button-text);\n // ACTIVE\n --button-tertiary-active-color: var(--cpsl-color-tertiary-button-text);\n --button-tertiary-active-background-color: var(--cpsl-color-tertiary-button-surface-pressed);\n --button-tertiary-active-border-color: var(--cpsl-color-tertiary-button-surface-pressed);\n --button-tertiary-active-icon-color: var(--cpsl-color-tertiary-button-text);\n\n // ******\n // GHOST BUTTON\n // ******\n // DEFAULT\n --button-ghost-color: var(--cpsl-color-ghost-button-default);\n // DISABLED\n --button-ghost-disabled-color: var(--cpsl-color-ghost-button-disabled);\n // HOVER\n --button-ghost-hover-color: var(--cpsl-color-ghost-button-hover);\n\n // ******\n // DESTRUCTIVE BUTTON\n // ******\n // DEFAULT\n --button-destructive-color: var(--cpsl-color-destructive-button-text);\n --button-destructive-background-color: var(--cpsl-color-destructive-button-surface-default);\n --button-destructive-border-color: var(--cpsl-color-destructive-button-border-default);\n --button-destructive-icon-color: var(--cpsl-color-destructive-button-text);\n // DISABLED\n --button-destructive-disabled-color: var(--cpsl-color-text-disabled);\n --button-destructive-disabled-background-color: var(--cpsl-color-destructive-button-surface-disabled);\n --button-destructive-disabled-border-color: var(--cpsl-color-destructive-button-border-disabled);\n --button-destructive-disabled-icon-color: var(--cpsl-color-destructive-button-text);\n // HOVER\n --button-destructive-hover-color: var(--cpsl-color-destructive-button-text);\n --button-destructive-hover-background-color: var(--cpsl-color-destructive-button-surface-hover);\n --button-destructive-hover-border-color: var(--cpsl-color-destructive-button-border-default);\n --button-destructive-hover-icon-color: var(--cpsl-color-destructive-button-text);\n // ACTIVE\n --button-destructive-active-color: var(--cpsl-color-destructive-button-text);\n --button-destructive-active-background-color: var(--cpsl-color-destructive-button-surface-pressed);\n --button-destructive-active-border-color: var(--cpsl-color-destructive-button-border-default);\n --button-destructive-active-icon-color: var(--cpsl-color-destructive-button-text);\n\n height: fit-content;\n width: fit-content;\n\n a {\n height: fit-content;\n width: auto !important;\n }\n\n display: inline-block;\n\n font-family: $font-family-base;\n -webkit-tap-highlight-color: transparent;\n}\n\n:host(.full-width) {\n width: 100%;\n display: block;\n\n & .button-native {\n width: 100%;\n }\n}\n\n:host(.small) {\n --button-font-size: var(--cpsl-font-size-body-s);\n --button-padding-top: 12px;\n --button-padding-bottom: 12px;\n --button-icon-size: var(--cpsl-font-size-body-m);\n}\n\n:host(.small.primary) {\n --button-padding-top: 13px;\n --button-padding-bottom: 13px;\n}\n\n:host(.small.tertiary) {\n --button-padding-top: 13px;\n --button-padding-bottom: 13px;\n}\n\n:host(.medium) {\n --button-font-size: var(--cpsl-font-size-body-m);\n --button-padding-top: 14px;\n --button-padding-bottom: 14px;\n --button-icon-size: var(--cpsl-font-size-body-l);\n\n & :host(.primary) {\n --button-padding-top: 15px;\n --button-padding-bottom: 15px;\n }\n\n & :host(.tertiary) {\n --button-padding-top: 15px;\n --button-padding-bottom: 15px;\n }\n}\n\n:host(.medium.primary) {\n --button-padding-top: 15px;\n --button-padding-bottom: 15px;\n}\n\n:host(.medium.tertiary) {\n --button-padding-top: 15px;\n --button-padding-bottom: 15px;\n}\n\n:host(.disabled) {\n cursor: default;\n pointer-events: none;\n}\n\n:host {\n ::slotted(cpsl-icon) {\n --height: var(--button-icon-size);\n --width: var(--button-icon-size);\n }\n}\n\n:host(.primary) {\n --button-border-radius: var(--cpsl-border-radius-primary-button);\n --button-color: var(--button-primary-color);\n --button-background-color: var(--button-primary-background-color);\n --button-border-color: var(--button-primary-border-color);\n --button-padding-start: 17px;\n --button-padding-end: 17px;\n --button-border-width: 0px;\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-primary-icon-color);\n }\n\n &:host(.disabled) {\n --button-color: var(--button-primary-disabled-color);\n --button-background-color: var(--button-primary-disabled-background-color);\n --button-border-color: var(--button-primary-disabled-border-color);\n --button-outline-color: transparent;\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-primary-disabled-icon-color);\n }\n ::slotted(cpsl-spinner) {\n --background-color: var(--button-primary-disabled-background-color);\n }\n }\n\n :not(.disabled) {\n &:hover {\n --button-color: var(--button-primary-hover-color);\n --button-background-color: var(--button-primary-hover-background-color);\n --button-border-color: var(--button-primary-hover-border-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-primary-hover-icon-color);\n }\n }\n &:active {\n --button-color: var(--button-primary-active-color);\n --button-background-color: var(--button-primary-active-background-color);\n --button-border-color: var(--button-primary-active-border-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-primary-active-icon-color);\n }\n }\n &:focus-visible {\n --button-outline-color: var(--cpsl-color-primary-button-outline);\n }\n }\n}\n\n:host(.secondary) {\n --button-border-radius: var(--cpsl-border-radius-destructive-button);\n --button-color: var(--button-secondary-color);\n --button-background-color: var(--button-secondary-background-color);\n --button-border-color: var(--button-secondary-border-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-secondary-icon-color);\n }\n\n &:host(.disabled) {\n --button-color: var(--button-secondary-disabled-color);\n --button-background-color: var(--button-secondary-disabled-background-color);\n --button-border-color: var(--button-secondary-disabled-border-color);\n --button-outline-color: transparent;\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-secondary-disabled-icon-color);\n }\n ::slotted(cpsl-spinner) {\n --background-color: var(--button-secondary-disabled-icon-color);\n }\n }\n\n :not(.disabled) {\n &:hover {\n --button-color: var(--button-secondary-hover-color);\n --button-border-color: var(--button-secondary-hover-border-color);\n --button-background-color: var(--button-secondary-hover-background-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-secondary-hover-icon-color);\n }\n }\n &:active {\n --button-color: var(--button-secondary-active-color);\n --button-border-color: var(--button-secondary-active-border-color);\n --button-background-color: var(--button-secondary-active-background-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-secondary-active-icon-color);\n }\n }\n &:focus-visible {\n --button-outline-color: var(--cpsl-color-secondary-button-outline);\n }\n }\n}\n\n:host(.tertiary) {\n --button-border-radius: var(--cpsl-border-radius-tertiary-button);\n --button-color: var(--button-tertiary-color);\n --button-background-color: var(--button-tertiary-background-color);\n --button-border-color: var(--button-tertiary-border-color);\n --button-padding-start: 17px;\n --button-padding-end: 17px;\n --button-border-width: 0px;\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-tertiary-icon-color);\n }\n\n &:host(.disabled) {\n --button-color: var(--button-tertiary-disabled-color);\n --button-background-color: var(--button-tertiary-disabled-background-color);\n --button-border-color: var(--button-tertiary-disabled-border-color);\n --button-outline-color: transparent;\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-tertiary-disabled-icon-color);\n }\n ::slotted(cpsl-spinner) {\n --background-color: var(--button-tertiary-disabled-icon-color);\n }\n }\n\n :not(.disabled) {\n &:hover {\n --button-color: var(--button-tertiary-hover-color);\n --button-background-color: var(--button-tertiary-hover-background-color);\n --button-border-color: var(--button-tertiary-hover-border-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-tertiary-hover-icon-color);\n }\n }\n &:active {\n --button-color: var(--button-tertiary-active-color);\n --button-background-color: var(--button-tertiary-active-background-color);\n --button-border-color: var(--button-tertiary-active-border-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-tertiary-active-icon-color);\n }\n }\n &:focus-visible {\n --button-outline-color: var(--cpsl-color-tertiary-button-outline);\n }\n }\n}\n\n:host(.ghost) {\n --button-color: var(--button-ghost-color);\n --button-background-color: transparent;\n --button-border-color: transparent;\n --button-outline-color: transparent;\n\n --button-padding-start: 0px;\n --button-padding-end: 0px;\n --button-padding-top: 0px;\n --button-padding-bottom: 0px;\n --button-border-width: 0px;\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-ghost-color);\n }\n\n &:host(.disabled) {\n --button-color: var(--button-ghost-disabled-color);\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-ghost-disabled-color);\n }\n ::slotted(cpsl-spinner) {\n --background-color: var(--button-ghost-disabled-color);\n }\n }\n\n :not(.disabled) {\n &:hover {\n --button-color: var(--button-ghost-hover-color);\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-ghost-hover-color);\n }\n }\n }\n}\n\n:host(.destructive) {\n --button-border-radius: var(--cpsl-border-radius-secondary-button);\n --button-color: var(--button-destructive-color);\n --button-background-color: var(--button-destructive-background-color);\n --button-border-color: var(--button-destructive-border-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-destructive-icon-color);\n }\n\n &:host(.disabled) {\n --button-color: var(--button-destructive-disabled-color);\n --button-background-color: var(--button-destructive-disabled-background-color);\n --button-border-color: var(--button-destructive-disabled-border-color);\n --button-outline-color: transparent;\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-destructive-disabled-icon-color);\n }\n }\n\n :not(.disabled) {\n &:hover {\n --button-color: var(--button-destructive-hover-color);\n --button-border-color: var(--button-destructive-hover-border-color);\n --button-background-color: var(--button-destructive-hover-background-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-destructive-hover-icon-color);\n }\n }\n &:active {\n --button-color: var(--button-destructive-active-color);\n --button-border-color: var(--button-destructive-active-border-color);\n --button-background-color: var(--button-destructive-active-background-color);\n\n ::slotted(cpsl-icon) {\n --icon-color: var(--button-destructive-active-icon-color);\n }\n }\n &:focus-visible {\n --button-outline-color: var(--cpsl-color-destructive-button-outline);\n }\n }\n}\n\n.button-native {\n @include border-radius(\n var(--button-border-radius-top-start),\n var(--button-border-radius-top-end),\n var(--button-border-radius-bottom-end),\n var(--button-border-radius-bottom-start)\n );\n @include padding(var(--button-padding-top), var(--button-padding-end), var(--button-padding-bottom), var(--button-padding-start));\n\n font-size: var(--button-font-size);\n font-weight: var(--button-font-weight);\n font-family: inherit;\n white-space: nowrap;\n text-decoration: none;\n\n border: 0px solid transparent;\n border-width: var(--button-border-width-top) var(--button-border-width-end) var(--button-border-width-bottom) var(--button-border-width-start);\n\n cursor: pointer;\n\n color: var(--button-color);\n background: var(--button-background-color);\n border-color: var(--button-border-color);\n\n display: flex;\n justify-content: var(--button-justify-content);\n align-items: center;\n height: 100%;\n gap: var(--button-gap);\n word-break: break-all;\n\n outline-color: var(--button-outline-color);\n -webkit-tap-highlight-color: transparent;\n}\n\n:host {\n ::slotted(cpsl-text) {\n color: var(--button-color);\n }\n ::slotted(cpsl-icon-group) {\n --container-border-color: var(--button-background-color);\n }\n ::slotted(cpsl-spinner) {\n --background-color: var(--button-background-color);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button',\n styleUrl: 'cpsl-button.scss',\n shadow: true,\n})\nexport class CpslButton {\n /**\n * The tag for the button.\n * Options are: `\"button\"`, `\"a\".\n * Default is: `\"button\"`.\n */\n @Prop() as?: 'button' | 'a' = 'button';\n\n /**\n * If the button is disabled.\n * Default is: false.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Whether the button takes the full width of it's container.\n * Default is: false.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * href to use when using a link.\n */\n @Prop() href?: string;\n\n /**\n * The size of the button.\n * Options are: `\"small\"`, `\"medium\".\n * Default is: `\"medium\"`.\n */\n @Prop() size?: 'small' | 'medium' = 'medium';\n\n /**\n * target to use when using a link.\n */\n @Prop() target?: string;\n\n /**\n * The variant of the button.\n * Options are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"ghost\"`, `\"destructive\"`.\n * Default is: `\"primary\"`.\n */\n @Prop({ reflect: true }) variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'destructive' = 'primary';\n\n render() {\n return (\n <Host\n class={{\n // VARIANTS\n 'primary': this.variant === 'primary',\n 'secondary': this.variant === 'secondary',\n 'tertiary': this.variant === 'tertiary',\n 'ghost': this.variant === 'ghost',\n 'destructive': this.variant === 'destructive',\n // STATE\n 'disabled': this.disabled,\n 'full-width': this.fullWidth,\n // SIZES\n 'small': this.size === 'small',\n 'medium': this.size === 'medium',\n }}\n >\n <this.as href={this.href} target={this.target} part=\"button-native\" class=\"button-native\">\n <slot name=\"start\"></slot>\n <slot></slot>\n <slot name=\"end\"></slot>\n </this.as>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --button-size: 32px;\n\n display: flex;\n}\n\n:host {\n ::slotted(cpsl-button:first-child) {\n --button-border-radius-top-end: 0px;\n --button-border-radius-bottom-end: 0px;\n }\n ::slotted(cpsl-button:last-child) {\n --button-border-width-start: 0px;\n --button-border-radius-top-start: 0px;\n --button-border-radius-bottom-start: 0px;\n }\n ::slotted(cpsl-button:not(:first-child):not(:last-child)) {\n --button-border-width-start: 0px;\n --button-border-radius-top-start: 0px;\n --button-border-radius-bottom-start: 0px;\n --button-border-radius-top-end: 0px;\n --button-border-radius-bottom-end: 0px;\n }\n ::slotted(cpsl-button) {\n --button-color: var(--cpsl-color-text-tertiary);\n --button-padding-start: 0px;\n --button-padding-end: 0px;\n --button-padding-top: 0px;\n --button-padding-bottom: 0px;\n --button-border-radius: var(--cpsl-border-radius-button-group);\n height: var(--button-size);\n width: var(--button-size);\n }\n ::slotted(cpsl-button.selected) {\n --button-color: var(--cpsl-color-text-primary);\n }\n}\n","import { Component, Host, Prop, Element, h, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button-group',\n styleUrl: 'cpsl-button-group.scss',\n shadow: true,\n})\nexport class CpslButtonGroup {\n @Element() el!: HTMLCpslButtonGroupElement;\n\n /**\n * The id of the selected button.\n */\n @Prop() selectedId?: string;\n\n @Watch('selectedId')\n selectItem() {\n this.buttonSlots.forEach(item => {\n if (item.id === this.selectedId) {\n item.classList.add('selected');\n } else {\n item.classList.remove('selected');\n }\n });\n }\n\n componentWillRender() {\n this.buttonSlots.forEach(item => {\n item.setAttribute('variant', 'secondary');\n item.setAttribute('full-width', 'true');\n this.selectItem();\n });\n\n if (this.otherSlots?.length) {\n console.error('cpsl-button is the only valid child of cpsl-button-group');\n this.otherSlots.forEach(item => item.remove());\n }\n }\n\n private get buttonSlots() {\n return this.el.querySelectorAll('cpsl-button');\n }\n\n private get otherSlots() {\n return this.el.querySelectorAll('&> *:not(cpsl-button)');\n }\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --card-padding-top: 24px;\n --card-padding-end: 24px;\n --card-padding-bottom: 24px;\n --card-padding-start: 24px;\n --card-border-width: 1px;\n --card-border-color: var(--cpsl-color-card-border);\n --card-border-radius-tl: var(--cpsl-border-radius-card);\n --card-border-radius-tr: var(--cpsl-border-radius-card);\n --card-border-radius-bl: var(--cpsl-border-radius-card);\n --card-border-radius-br: var(--cpsl-border-radius-card);\n --card-background-color: var(--cpsl-color-card-surface);\n\n display: block;\n}\n\n.card {\n @include padding(var(--card-padding-top), var(--card-padding-end), var(--card-padding-bottom), var(--card-padding-start));\n\n display: block;\n box-sizing: border-box;\n overflow: hidden;\n\n border: var(--card-border-width) solid var(--card-border-color);\n border-radius: var(--card-border-radius-tl) var(--card-border-radius-tr) var(--card-border-radius-br) var(--card-border-radius-bl);\n background: var(--card-background-color);\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-card',\n styleUrl: 'cpsl-card.scss',\n shadow: true,\n})\nexport class CpslCard {\n render() {\n return (\n <Host>\n <div class={{ card: true }} part=\"card-container\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n // CONTAINER\n --container-height: 20px;\n --container-width: 20px;\n --container-border-radius: var(--cpsl-border-radius-checkbox);\n --container-border-width: 2px;\n --container-background-color-default: var(--cpsl-color-checkbox-surface-default);\n --container-border-color-default: var(--cpsl-color-checkbox-border-default);\n --container-background-color-checked: var(--cpsl-color-checkbox-surface-checked);\n --container-border-color-checked: var(--cpsl-color-checkbox-border-checked);\n\n // ICON\n --icon-height: 16px;\n --icon-width: 16px;\n --checkbox-icon-color: var(--cpsl-color-checkbox-icon);\n\n display: block;\n position: relative;\n\n height: var(--container-height);\n width: var(--container-width);\n cursor: pointer;\n}\n\ninput {\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0px;\n opacity: 0;\n}\n\nspan.container {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: var(--container-border-radius);\n border: var(--container-border-width) solid;\n background: var(--container-background-color-default);\n border-color: var(--container-border-color-default);\n\n transition: all 0.15s ease-in-out;\n\n cpsl-icon {\n --height: var(--icon-height);\n --width: var(--icon-width);\n opacity: 0;\n --icon-color: var(--checkbox-icon-color);\n transition: all 0.15s ease-in-out;\n }\n\n &.checked {\n background: var(--container-background-color-checked);\n border-color: var(--container-border-color-checked);\n\n cpsl-icon {\n opacity: 1;\n }\n }\n}\n","import { Component, EventEmitter, Host, Prop, Event, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-checkbox',\n styleUrl: 'cpsl-checkbox.scss',\n shadow: true,\n})\nexport class CpslCheckbox {\n /**\n * Whether or not the checkbox is checked.\n */\n @Prop() checked: boolean;\n\n /**\n * Emitted when the checkbox state changes.\n */\n @Event() cpslCheckboxChanged!: EventEmitter<boolean>;\n\n private handleCheckboxClick = () => {\n this.cpslCheckboxChanged.emit(!this.checked);\n };\n\n render() {\n return (\n <Host>\n <input type=\"checkbox\" checked={this.checked} />\n <span onClick={this.handleCheckboxClick} class={{ container: true, checked: this.checked }}>\n <cpsl-icon icon=\"check\" />\n </span>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --input-width: 40px;\n --input-height: 54px;\n\n --input-border-radius: var(--cpsl-border-radius-input);\n --input-border-color: var(--cpsl-color-input-border-placeholder);\n --input-border-width: 1px;\n --input-background-color: var(--cpsl-color-input-surface-default);\n --input-border-error-color: var(--cpsl-color-input-border-error);\n\n --input-font-size: #{dynamic-font-clamp(1, 20px, 1.5)};\n --input-color: var(--cpsl-color-text-primary);\n\n --helper-text-color: var(--cpsl-color-text-secondary);\n --helper-text-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-color: var(--cpsl-color-text-secondary);\n --helper-text-icon-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-size: 16px;\n --helper-text-font-size: 12px;\n --helper-text-margin-top: 6px;\n\n display: block;\n font-family: $font-family-base;\n}\n\n.code-container {\n display: flex;\n gap: 8px;\n}\n\n.code-input {\n font-family: $font-family-base;\n @include border-radius(var(--input-border-radius));\n font-size: var(--input-font-size);\n\n border-color: var(--input-border-color);\n border-width: var(--input-border-width);\n border-style: solid;\n\n font-size: var(--input-font-size);\n color: var(--input-color);\n\n width: var(--input-width);\n height: var(--input-height);\n background: var(--input-background-color);\n\n box-sizing: border-box;\n text-align: center;\n outline: none;\n\n &.has-value {\n --input-border-color: var(--cpsl-color-accent-32);\n }\n\n &:focus {\n --input-border-color: var(--cpsl-color-input-border-active);\n }\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n}\n\n.code-input .error-container {\n border-color: var(--input-border-error-color);\n}\n\ninput[type='number'] {\n -moz-appearance: textfield;\n}\n\n.helper-text-container {\n flex-basis: 100%;\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--helper-text-color);\n font-size: var(--helper-text-font-size);\n\n margin-top: var(--helper-text-margin-top);\n\n cpsl-icon {\n --height: var(--helper-text-icon-size);\n --width: var(--helper-text-icon-size);\n --icon-color: var(--helper-text-icon-color);\n }\n}\n\n.error-text {\n color: var(--helper-text-error-color);\n\n cpsl-icon {\n --icon-color: var(--helper-text-icon-error-color);\n }\n}\n","import { Component, Host, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\nimport { CodeChangeEventDetail } from './code-change-interface';\n\n@Component({\n tag: 'cpsl-code-input',\n styleUrl: 'cpsl-code-input.scss',\n shadow: true,\n})\nexport class CpslCodeInput {\n @Element() el!: HTMLCpslCodeInputElement;\n\n /**\n * Value of the code.\n */\n\n @Prop({ mutable: true }) code: string;\n\n /**\n * Error text to show below the input. If this is provided the input will enter an error state.\n */\n @Prop() errorText?: string;\n\n /**\n * Helper text to show below the input. If `\"errorText\"` is provided that will take precedence.\n */\n @Prop() helperText?: string;\n\n /**\n * Length of the code.\n */\n @Prop() length: number;\n\n /**\n * Type of characters to accept in the code.\n * Defaults to number.\n */\n @Prop() type?: 'number' | 'string' = 'number';\n\n /**\n * The `cpslInput` event is fired each time the user modifies the input's value.\n */\n @Event() cpslInput!: EventEmitter<CodeChangeEventDetail>;\n\n private handleInput = (ind: number, ev: InputEvent) => {\n const inputElements = this.inputs;\n // If getting an insertFromPaste remove the last element value since the value setting is handled in the paste event\n if (ev.inputType === 'insertFromPaste') {\n inputElements[Math.min(this.length - 1, ind)].value = '';\n return;\n }\n if (ev.inputType === 'insertText') {\n if (this.type === 'number' && isNaN(parseInt(ev.data))) {\n inputElements[ind].value = '';\n return;\n }\n const newCode = `${this.code ?? ''}${ev.data}`;\n inputElements[Math.min(this.length - 1, newCode.length)].focus();\n this.cpslInput.emit({ value: newCode });\n this.code = newCode;\n }\n };\n\n private handleKeyDown = (ind: number, ev: KeyboardEvent) => {\n const inputElements = this.inputs;\n\n switch (ev.key) {\n case 'Backspace': {\n let newCode;\n if (!inputElements[ind].value) {\n inputElements[Math.max(0, ind - 1)].value = '';\n inputElements[Math.max(0, ind - 1)].focus();\n newCode = this.code.substring(0, ind - 1);\n } else {\n newCode = this.code.substring(0, ind);\n }\n this.cpslInput.emit({ value: newCode });\n this.code = newCode;\n break;\n }\n case 'ArrowLeft': {\n setTimeout(() => {\n this.inputs[ind].setSelectionRange(1, 1);\n }, 0);\n break;\n }\n default: {\n break;\n }\n }\n };\n\n private handleFocus = (ind: number) => {\n const inputElements = this.inputs;\n\n for (const input of inputElements) {\n if (!input.value) {\n input.focus();\n break;\n } else if (input.id === `code-input-${this.length - 1}`) {\n input.focus();\n break;\n }\n }\n\n setTimeout(() => {\n inputElements[ind].setSelectionRange(1, 1);\n }, 0);\n };\n\n private handlePaste = (e: ClipboardEvent) => {\n const inputElements = this.inputs;\n const pastedCode = e.clipboardData.getData('text');\n\n if (this.type === 'number' && isNaN(parseInt(pastedCode))) {\n // Remove illegal value from the first input. Not using a timeout here doesn't change the value properly.\n setTimeout(() => {\n inputElements[0].value = '';\n }, 0);\n return;\n }\n\n this.cpslInput.emit({\n value: pastedCode,\n });\n inputElements.forEach((input, index) => {\n input.value = pastedCode.charAt(index);\n });\n inputElements[Math.min(this.length - 1, pastedCode.length)].focus();\n };\n\n private get inputs() {\n return Array.from(this.el.shadowRoot.querySelectorAll('input'));\n }\n\n render() {\n return (\n <Host>\n <div class=\"code-container\">\n {new Array(this.length).fill(0).map((_, i) => (\n <input\n class={{ 'code-input': true, 'error': Boolean(this.errorText), 'has-value': this.code?.[i] !== undefined }}\n id={`code-input-${i}`}\n onKeyDown={ev => this.handleKeyDown(i, ev)}\n onInput={ev => this.handleInput(i, ev)}\n onFocus={() => this.handleFocus(i)}\n onPaste={this.handlePaste}\n min={0}\n max={9}\n value={this.code?.[i]}\n inputMode={this.type === 'number' ? 'numeric' : 'text'}\n />\n ))}\n </div>\n {(this.errorText || this.helperText) && (\n <div class={{ 'helper-text-container': true, 'error-text': Boolean(this.errorText) }}>\n <cpsl-icon icon={this.errorText ? 'alertCircle' : 'infoCircle'} />\n <span>{this.errorText ?? this.helperText}</span>\n </div>\n )}\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --divider-height: 1px;\n --divider-color: var(--cpsl-color-divider);\n\n display: flex;\n align-items: center;\n height: 24px;\n width: 100%;\n color: var(--cpsl-color-text-subtle);\n\n font-family: $font-family-base;\n font-size: #{dynamic-font-clamp(1, 14px, 1.5)};\n font-weight: 500;\n gap: 16px;\n}\n\n:host div {\n flex: 1;\n background: var(--divider-color);\n height: var(--divider-height);\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-divider',\n styleUrl: 'cpsl-divider.scss',\n shadow: true,\n})\nexport class CpslDivider {\n render() {\n return (\n <Host>\n <div />\n <slot></slot>\n <div />\n </Host>\n );\n }\n}\n","@use 'sass:map';\n@import '../../themes/capsule.globals';\n\n:host {\n display: flex;\n\n position: fixed;\n z-index: map.get($z-indices, 'drawer');\n}\n\n:host(.left) {\n left: 0;\n top: 0;\n transition: left;\n}\n\n:host(.right) {\n right: 0;\n top: 0;\n transition: right;\n}\n\n:host(.top) {\n top: 0;\n left: 0;\n transition: top;\n}\n\n:host(.bottom) {\n bottom: 0;\n left: 0;\n transition: bottom;\n}\n\n.container {\n flex: 1;\n overflow: auto;\n z-index: map.get($z-indices, 'drawer');\n}\n","import { Component, Host, Prop, Element, h, State } from '@stencil/core';\nimport { DEFAULT_Z_INDICES } from '../../constants';\n\n@Component({\n tag: 'cpsl-drawer',\n styleUrl: 'cpsl-drawer.scss',\n shadow: true,\n})\nexport class CpslDrawer {\n @Element() el!: HTMLCpslDrawerElement;\n\n @State() closedAnchorPosition?: string;\n @State() showTransition: boolean;\n\n /**\n * Side from which the drawer will enter from.\n */\n @Prop() anchor: 'top' | 'bottom' | 'left' | 'right';\n\n /**\n * Starting anchor position.\n */\n @Prop() anchorPosition?: number;\n\n /**\n * Hides the overlay for temporary drawers.\n */\n @Prop() noOverlay?: boolean;\n\n /**\n * Whether the drawer is open or not.\n */\n @Prop() open: boolean;\n\n /**\n * Size (height or width) of the drawer.\n */\n @Prop() size: number | 'auto';\n\n /**\n * Duration in seconds of the open/close animation.\n * Default is 0.15.\n */\n @Prop() transitionDuration?: number = 0.15;\n\n /**\n * Transition timing function to use.\n * Default is ease-in-out.\n */\n @Prop() transitionFunction?: string = 'ease-in-out';\n\n /**\n * The variant of the drawer.\n * `temporary` drawers will cover content and contain a backdrop. `permanent` drawers will sit beside content, i.e. desktop navigation.\n * Default is `temporary`.\n */\n @Prop() variant?: 'temporary' | 'permanent' = 'temporary';\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n componentDidLoad() {\n this.closedAnchorPosition = `-${this.getContainerHeight()}px`;\n // Show transition after initial render\n setTimeout(() => {\n this.showTransition = true;\n }, 100);\n }\n\n private getContainerHeight() {\n return this.containerEl?.clientHeight;\n }\n\n private get containerEl() {\n return this.el.shadowRoot.getElementById('container');\n }\n\n render() {\n const setHeight = this.anchor === 'top' || this.anchor === 'bottom';\n const startingAnchor = `${this.anchorPosition}px` ?? '0px';\n const size = this.size === 'auto' ? 'auto' : `${this.size}px`;\n\n return (\n <Host\n style={{\n width: setHeight ? '100vw' : size,\n height: setHeight ? size : '100vh',\n transitionDuration: `${this.showTransition ? this.transitionDuration : 0}s`,\n transitionTimingFunction: `${this.transitionFunction}`,\n [this.anchor]: this.open || this.variant === 'permanent' ? startingAnchor : this.closedAnchorPosition,\n opacity: this.closedAnchorPosition === undefined ? '0' : '1',\n ...(this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}),\n }}\n class={{\n top: this.anchor === 'top',\n bottom: this.anchor === 'bottom',\n left: this.anchor === 'left',\n right: this.anchor === 'right',\n }}\n >\n {this.variant === 'temporary' && !this.noOverlay && <cpsl-overlay open={this.open} zIndexOverride={DEFAULT_Z_INDICES.modal + 1} />}\n <div id=\"container\" class=\"container\" part=\"container\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n","import AlertCircle from './alert-circle.svg';import AngelListBrand from './angel-list-brand.svg';import AngelList from './angel-list.svg';import AppleBrand from './apple-brand.svg';import Apple from './apple.svg';import ArrowCircleBrokenDownLeft from './arrow-circle-broken-down-left.svg';import ArrowNarrow from './arrow-narrow.svg';import Arrow from './arrow.svg';import BackupKit from './backup-kit.svg';import Bank from './bank.svg';import Brush from './brush.svg';import CapsuleLogo from './capsule-logo.svg';import CapsuleRingsDark from './capsule-rings-dark.svg';import CapsuleRings from './capsule-rings.svg';import Capsule from './capsule.svg';import CheckCircleFilled from './check-circle-filled.svg';import CheckCircle from './check-circle.svg';import Check from './check.svg';import ChevronUp from './chevron-up.svg';import Clock from './clock.svg';import Close from './close.svg';import ClubhouseBrand from './clubhouse-brand.svg';import Clubhouse from './clubhouse.svg';import Copy from './copy.svg';import Cosmos from './cosmos.svg';import CreditCard from './credit-card.svg';import Cube from './cube.svg';import DecentBrand from './decent-brand.svg';import Decent from './decent.svg';import DiscordBrand from './discord-brand.svg';import Discord from './discord.svg';import Dot from './dot.svg';import DownloadCloud from './download-cloud.svg';import Download from './download.svg';import DribbbleBrand from './dribbble-brand.svg';import Dribbble from './dribbble.svg';import Earth from './earth.svg';import Ethereum from './ethereum.svg';import EyeOff from './eye-off.svg';import Eye from './eye.svg';import FacebookBrand from './facebook-brand.svg';import Facebook from './facebook.svg';import FarcasterBrand from './farcaster-brand.svg';import Farcaster from './farcaster.svg';import FigmaBrand from './figma-brand.svg';import Figma from './figma.svg';import File from './file.svg';import Folder from './folder.svg';import GithubBrand from './github-brand.svg';import Github from './github.svg';import Globe from './globe.svg';import GoogleBrand from './google-brand.svg';import Google from './google.svg';import HelpCircle from './help-circle.svg';import HeroAlertCircle from './hero-alert-circle.svg';import HeroCheckmarkCapsule from './hero-checkmark-capsule.svg';import HeroCheckmark from './hero-checkmark.svg';import HeroEmail from './hero-email.svg';import HeroExternalConnection from './hero-external-connection.svg';import HeroLock from './hero-lock.svg';import HeroPasskey from './hero-passkey.svg';import HeroPhone from './hero-phone.svg';import HeroPlusCircleCapsule from './hero-plus-circle-capsule.svg';import HeroPlusCircle from './hero-plus-circle.svg';import HeroWallet from './hero-wallet.svg';import Home from './home.svg';import Image from './image.svg';import InfoCircle from './info-circle.svg';import InstagramBrand from './instagram-brand.svg';import Instagram from './instagram.svg';import Key from './key.svg';import Lightning01 from './lightning-01.svg';import Lightning from './lightning.svg';import LinkExternal from './link-external.svg';import LinkedinBrand from './linkedin-brand.svg';import Linkedin from './linkedin.svg';import LogOut from './log-out.svg';import Mail from './mail.svg';import Menu from './menu.svg';import MoonpayBrand from './moonpay-brand.svg';import MoreLoginOptions from './more-login-options.svg';import Phone from './phone.svg';import PintrestBrand from './pintrest-brand.svg';import Pintrest from './pintrest.svg';import PlusCircle from './plus-circle.svg';import PuzzlePiece from './puzzle-piece.svg';import QrCode02 from './qr-code-02.svg';import QrCode from './qr-code.svg';import RampNetworkBrand from './ramp-network-brand.svg';import RampNetwork from './ramp-network.svg';import RedditBrand from './reddit-brand.svg';import Reddit from './reddit.svg';import Refresh from './refresh.svg';import Search from './search.svg';import Send from './send.svg';import Settings from './settings.svg';import Shield from './shield.svg';import SignalBrand from './signal-brand.svg';import Signal from './signal.svg';import SnapchatBrand from './snapchat-brand.svg';import Snapchat from './snapchat.svg';import Solana from './solana.svg';import Stars from './stars.svg';import StripeBrand from './stripe-brand.svg';import TelegramBrand from './telegram-brand.svg';import Telegram from './telegram.svg';import TikTokBrand from './tik-tok-brand.svg';import TikTok from './tik-tok.svg';import TumblrBrand from './tumblr-brand.svg';import Tumblr from './tumblr.svg';import TwitterBrand from './twitter-brand.svg';import Twitter from './twitter.svg';import Wallet from './wallet.svg';import X from './x.svg';import YoutubeBrand from './youtube-brand.svg';import Youtube from './youtube.svg';import AD from './flags/AD.svg';import AE from './flags/AE.svg';import AF from './flags/AF.svg';import AG from './flags/AG.svg';import AI from './flags/AI.svg';import AL from './flags/AL.svg';import AM from './flags/AM.svg';import AO from './flags/AO.svg';import AR from './flags/AR.svg';import AS from './flags/AS.svg';import AT from './flags/AT.svg';import AU from './flags/AU.svg';import AW from './flags/AW.svg';import AX from './flags/AX.svg';import AZ from './flags/AZ.svg';import BA from './flags/BA.svg';import BB from './flags/BB.svg';import BD from './flags/BD.svg';import BE from './flags/BE.svg';import BF from './flags/BF.svg';import BG from './flags/BG.svg';import BH from './flags/BH.svg';import BI from './flags/BI.svg';import BJ from './flags/BJ.svg';import BL from './flags/BL.svg';import BM from './flags/BM.svg';import BN from './flags/BN.svg';import BO from './flags/BO.svg';import BQ from './flags/BQ.svg';import BQ2 from './flags/BQ2.svg';import BQ3 from './flags/BQ3.svg';import BR from './flags/BR.svg';import BS from './flags/BS.svg';import BT from './flags/BT.svg';import BW from './flags/BW.svg';import BY from './flags/BY.svg';import BZ from './flags/BZ.svg';import CA from './flags/CA.svg';import CC from './flags/CC.svg';import CD from './flags/CD.svg';import CD2 from './flags/CD2.svg';import CF from './flags/CF.svg';import CH from './flags/CH.svg';import CK from './flags/CK.svg';import CL from './flags/CL.svg';import CM from './flags/CM.svg';import CN from './flags/CN.svg';import CO from './flags/CO.svg';import CR from './flags/CR.svg';import CU from './flags/CU.svg';import CW from './flags/CW.svg';import CX from './flags/CX.svg';import CY from './flags/CY.svg';import CZ from './flags/CZ.svg';import DE from './flags/DE.svg';import DJ from './flags/DJ.svg';import DK from './flags/DK.svg';import DM from './flags/DM.svg';import DO from './flags/DO.svg';import DS from './flags/DS.svg';import DZ from './flags/DZ.svg';import EC from './flags/EC.svg';import EE from './flags/EE.svg';import EG from './flags/EG.svg';import EH from './flags/EH.svg';import ER from './flags/ER.svg';import ES from './flags/ES.svg';import ET from './flags/ET.svg';import FI from './flags/FI.svg';import FJ from './flags/FJ.svg';import FK from './flags/FK.svg';import FM from './flags/FM.svg';import FO from './flags/FO.svg';import FR from './flags/FR.svg';import GA from './flags/GA.svg';import GB2 from './flags/GB-2.svg';import GB from './flags/GB.svg';import GD from './flags/GD.svg';import GE from './flags/GE.svg';import GG from './flags/GG.svg';import GH from './flags/GH.svg';import GI from './flags/GI.svg';import GL from './flags/GL.svg';import GM from './flags/GM.svg';import GN from './flags/GN.svg';import GQ from './flags/GQ.svg';import GR from './flags/GR.svg';import GT from './flags/GT.svg';import GU from './flags/GU.svg';import GW from './flags/GW.svg';import GY from './flags/GY.svg';import HK from './flags/HK.svg';import HN from './flags/HN.svg';import HR from './flags/HR.svg';import HT from './flags/HT.svg';import HU from './flags/HU.svg';import ID from './flags/ID.svg';import IE from './flags/IE.svg';import IL from './flags/IL.svg';import IM from './flags/IM.svg';import IN from './flags/IN.svg';import IO from './flags/IO.svg';import IQ from './flags/IQ.svg';import IR from './flags/IR.svg';import IS from './flags/IS.svg';import IT from './flags/IT.svg';import JE from './flags/JE.svg';import JM from './flags/JM.svg';import JO from './flags/JO.svg';import JP from './flags/JP.svg';import KE from './flags/KE.svg';import KG from './flags/KG.svg';import KH from './flags/KH.svg';import KI from './flags/KI.svg';import KM from './flags/KM.svg';import KN from './flags/KN.svg';import KP from './flags/KP.svg';import KR from './flags/KR.svg';import KW from './flags/KW.svg';import KY from './flags/KY.svg';import KZ from './flags/KZ.svg';import LA from './flags/LA.svg';import LB from './flags/LB.svg';import LC from './flags/LC.svg';import LI from './flags/LI.svg';import LK from './flags/LK.svg';import LR from './flags/LR.svg';import LS from './flags/LS.svg';import LT from './flags/LT.svg';import LU from './flags/LU.svg';import LV from './flags/LV.svg';import LY from './flags/LY.svg';import MA from './flags/MA.svg';import MC from './flags/MC.svg';import MD from './flags/MD.svg';import ME from './flags/ME.svg';import MG from './flags/MG.svg';import MH from './flags/MH.svg';import MK from './flags/MK.svg';import ML from './flags/ML.svg';import MM from './flags/MM.svg';import MN from './flags/MN.svg';import MO from './flags/MO.svg';import MP from './flags/MP.svg';import MQ from './flags/MQ.svg';import MR from './flags/MR.svg';import MS from './flags/MS.svg';import MT from './flags/MT.svg';import MU from './flags/MU.svg';import MV from './flags/MV.svg';import MW from './flags/MW.svg';import MX from './flags/MX.svg';import MY from './flags/MY.svg';import MZ from './flags/MZ.svg';import NA from './flags/NA.svg';import NE from './flags/NE.svg';import NF from './flags/NF.svg';import NG from './flags/NG.svg';import NI from './flags/NI.svg';import NL from './flags/NL.svg';import NO from './flags/NO.svg';import NP from './flags/NP.svg';import NR from './flags/NR.svg';import NU from './flags/NU.svg';import NZ from './flags/NZ.svg';import OM from './flags/OM.svg';import PA from './flags/PA.svg';import PE from './flags/PE.svg';import PF from './flags/PF.svg';import PG from './flags/PG.svg';import PH from './flags/PH.svg';import PK from './flags/PK.svg';import PL from './flags/PL.svg';import PN from './flags/PN.svg';import PR from './flags/PR.svg';import PS from './flags/PS.svg';import PT from './flags/PT.svg';import PW from './flags/PW.svg';import PY from './flags/PY.svg';import QA from './flags/QA.svg';import RO from './flags/RO.svg';import RS from './flags/RS.svg';import RU from './flags/RU.svg';import RW from './flags/RW.svg';import SA from './flags/SA.svg';import SB from './flags/SB.svg';import SC from './flags/SC.svg';import SE from './flags/SE.svg';import SG from './flags/SG.svg';import SI from './flags/SI.svg';import SK from './flags/SK.svg';import SL from './flags/SL.svg';import SM from './flags/SM.svg';import SN from './flags/SN.svg';import SO from './flags/SO.svg';import SR from './flags/SR.svg';import SS from './flags/SS.svg';import ST from './flags/ST.svg';import SV from './flags/SV.svg';import SX from './flags/SX.svg';import SY from './flags/SY.svg';import SZ from './flags/SZ.svg';import TC from './flags/TC.svg';import TD from './flags/TD.svg';import TG from './flags/TG.svg';import TH from './flags/TH.svg';import TJ from './flags/TJ.svg';import TK from './flags/TK.svg';import TL from './flags/TL.svg';import TM from './flags/TM.svg';import TN from './flags/TN.svg';import TO from './flags/TO.svg';import TR from './flags/TR.svg';import TT from './flags/TT.svg';import TV from './flags/TV.svg';import TW from './flags/TW.svg';import TZ from './flags/TZ.svg';import UA from './flags/UA.svg';import UG from './flags/UG.svg';import US from './flags/US.svg';import UY from './flags/UY.svg';import UZ from './flags/UZ.svg';import VC from './flags/VC.svg';import VE from './flags/VE.svg';import VG from './flags/VG.svg';import VI from './flags/VI.svg';import VN from './flags/VN.svg';import VU from './flags/VU.svg';import WS from './flags/WS.svg';import YE from './flags/YE.svg';import ZA from './flags/ZA.svg';import ZM from './flags/ZM.svg';import ZW from './flags/ZW.svg';\nexport const Icons = {alertCircle: AlertCircle,angelListBrand: AngelListBrand,angelList: AngelList,appleBrand: AppleBrand,apple: Apple,arrowCircleBrokenDownLeft: ArrowCircleBrokenDownLeft,arrowNarrow: ArrowNarrow,arrow: Arrow,backupKit: BackupKit,bank: Bank,brush: Brush,capsuleLogo: CapsuleLogo,capsuleRingsDark: CapsuleRingsDark,capsuleRings: CapsuleRings,capsule: Capsule,checkCircleFilled: CheckCircleFilled,checkCircle: CheckCircle,check: Check,chevronUp: ChevronUp,clock: Clock,close: Close,clubhouseBrand: ClubhouseBrand,clubhouse: Clubhouse,copy: Copy,cosmos: Cosmos,creditCard: CreditCard,cube: Cube,decentBrand: DecentBrand,decent: Decent,discordBrand: DiscordBrand,discord: Discord,dot: Dot,downloadCloud: DownloadCloud,download: Download,dribbbleBrand: DribbbleBrand,dribbble: Dribbble,earth: Earth,ethereum: Ethereum,eyeOff: EyeOff,eye: Eye,facebookBrand: FacebookBrand,facebook: Facebook,farcasterBrand: FarcasterBrand,farcaster: Farcaster,figmaBrand: FigmaBrand,figma: Figma,file: File,folder: Folder,githubBrand: GithubBrand,github: Github,globe: Globe,googleBrand: GoogleBrand,google: Google,helpCircle: HelpCircle,heroAlertCircle: HeroAlertCircle,heroCheckmarkCapsule: HeroCheckmarkCapsule,heroCheckmark: HeroCheckmark,heroEmail: HeroEmail,heroExternalConnection: HeroExternalConnection,heroLock: HeroLock,heroPasskey: HeroPasskey,heroPhone: HeroPhone,heroPlusCircleCapsule: HeroPlusCircleCapsule,heroPlusCircle: HeroPlusCircle,heroWallet: HeroWallet,home: Home,image: Image,infoCircle: InfoCircle,instagramBrand: InstagramBrand,instagram: Instagram,key: Key,lightning01: Lightning01,lightning: Lightning,linkExternal: LinkExternal,linkedinBrand: LinkedinBrand,linkedin: Linkedin,logOut: LogOut,mail: Mail,menu: Menu,moonpayBrand: MoonpayBrand,moreLoginOptions: MoreLoginOptions,phone: Phone,pintrestBrand: PintrestBrand,pintrest: Pintrest,plusCircle: PlusCircle,puzzlePiece: PuzzlePiece,qrCode02: QrCode02,qrCode: QrCode,rampNetworkBrand: RampNetworkBrand,rampNetwork: RampNetwork,redditBrand: RedditBrand,reddit: Reddit,refresh: Refresh,search: Search,send: Send,settings: Settings,shield: Shield,signalBrand: SignalBrand,signal: Signal,snapchatBrand: SnapchatBrand,snapchat: Snapchat,solana: Solana,stars: Stars,stripeBrand: StripeBrand,telegramBrand: TelegramBrand,telegram: Telegram,tikTokBrand: TikTokBrand,tikTok: TikTok,tumblrBrand: TumblrBrand,tumblr: Tumblr,twitterBrand: TwitterBrand,twitter: Twitter,wallet: Wallet,x: X,youtubeBrand: YoutubeBrand,youtube: Youtube,AD: AD,AE: AE,AF: AF,AG: AG,AI: AI,AL: AL,AM: AM,AO: AO,AR: AR,AS: AS,AT: AT,AU: AU,AW: AW,AX: AX,AZ: AZ,BA: BA,BB: BB,BD: BD,BE: BE,BF: BF,BG: BG,BH: BH,BI: BI,BJ: BJ,BL: BL,BM: BM,BN: BN,BO: BO,BQ: BQ,BQ2: BQ2,BQ3: BQ3,BR: BR,BS: BS,BT: BT,BW: BW,BY: BY,BZ: BZ,CA: CA,CC: CC,CD: CD,CD2: CD2,CF: CF,CH: CH,CK: CK,CL: CL,CM: CM,CN: CN,CO: CO,CR: CR,CU: CU,CW: CW,CX: CX,CY: CY,CZ: CZ,DE: DE,DJ: DJ,DK: DK,DM: DM,DO: DO,DS: DS,DZ: DZ,EC: EC,EE: EE,EG: EG,EH: EH,ER: ER,ES: ES,ET: ET,FI: FI,FJ: FJ,FK: FK,FM: FM,FO: FO,FR: FR,GA: GA,GB2: GB2,GB: GB,GD: GD,GE: GE,GG: GG,GH: GH,GI: GI,GL: GL,GM: GM,GN: GN,GQ: GQ,GR: GR,GT: GT,GU: GU,GW: GW,GY: GY,HK: HK,HN: HN,HR: HR,HT: HT,HU: HU,ID: ID,IE: IE,IL: IL,IM: IM,IN: IN,IO: IO,IQ: IQ,IR: IR,IS: IS,IT: IT,JE: JE,JM: JM,JO: JO,JP: JP,KE: KE,KG: KG,KH: KH,KI: KI,KM: KM,KN: KN,KP: KP,KR: KR,KW: KW,KY: KY,KZ: KZ,LA: LA,LB: LB,LC: LC,LI: LI,LK: LK,LR: LR,LS: LS,LT: LT,LU: LU,LV: LV,LY: LY,MA: MA,MC: MC,MD: MD,ME: ME,MG: MG,MH: MH,MK: MK,ML: ML,MM: MM,MN: MN,MO: MO,MP: MP,MQ: MQ,MR: MR,MS: MS,MT: MT,MU: MU,MV: MV,MW: MW,MX: MX,MY: MY,MZ: MZ,NA: NA,NE: NE,NF: NF,NG: NG,NI: NI,NL: NL,NO: NO,NP: NP,NR: NR,NU: NU,NZ: NZ,OM: OM,PA: PA,PE: PE,PF: PF,PG: PG,PH: PH,PK: PK,PL: PL,PN: PN,PR: PR,PS: PS,PT: PT,PW: PW,PY: PY,QA: QA,RO: RO,RS: RS,RU: RU,RW: RW,SA: SA,SB: SB,SC: SC,SE: SE,SG: SG,SI: SI,SK: SK,SL: SL,SM: SM,SN: SN,SO: SO,SR: SR,SS: SS,ST: ST,SV: SV,SX: SX,SY: SY,SZ: SZ,TC: TC,TD: TD,TG: TG,TH: TH,TJ: TJ,TK: TK,TL: TL,TM: TM,TN: TN,TO: TO,TR: TR,TT: TT,TV: TV,TW: TW,TZ: TZ,UA: UA,UG: UG,US: US,UY: UY,UZ: UZ,VC: VC,VE: VE,VG: VG,VI: VI,VN: VN,VU: VU,WS: WS,YE: YE,ZA: ZA,ZM: ZM,ZW: ZW,}","@import '../../themes/capsule.globals';\n\n:host {\n display: block;\n position: relative;\n font-family: Arial, sans-serif;\n\n --input-color: var(--cpsl-color-text-primary);\n --container-background-color: var(--cpsl-color-input-surface-default);\n --container-border-color: var(--cpsl-color-input-border-active);\n --scrollbar-color: var(--cpsl-color-text-subtle);\n --divider-color: var(--cpsl-color-divider);\n --input-placeholder-color: var(--cpsl-color-text-secondary);\n --input-font-size: var(--cpsl-font-size-body-m);\n --button-hover-color: var(--cpsl-color-tile-button-surface-hover);\n font-family: $font-family-base;\n}\n\n.input-container {\n position: relative;\n width: 100%;\n}\n\n::slotted(cpsl-dropdown) {\n position: absolute;\n width: 100%;\n top: 100%;\n left: 0;\n z-index: 2;\n}\n\n.dropdown-button {\n display: flex;\n width: 100%;\n padding: 0 4px;\n background: none;\n border: none;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n color: var(--input-color);\n}\n\n.dropdown-button span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n}\n\n.dropdown-button div {\n margin-left: 8px;\n display: flex;\n align-items: center;\n}\n\n.dropdown-options {\n display: none;\n position: fixed;\n list-style: none;\n padding: 0;\n margin-top: 4px;\n border: 1px solid var(--container-border-color);\n border-radius: 8px;\n z-index: 999999999999;\n overflow-y: auto; /* Enable vertical scrolling */\n max-height: 300px; /* Initial max height */\n box-sizing: border-box; /* Includes padding and border in the height */\n background-color: var(--container-background-color); /* Background color for the ul component */\n}\n\n.dropdown-options.open {\n display: block;\n}\n\n.dropdown-options li {\n padding: 8px;\n cursor: pointer;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--cpsl-color-divider);\n color: var(--input-color);\n background: var(--container-background-color);\n font-size: var(--input-font-size);\n}\n\n.dropdown-options li:hover {\n background-color: var(--button-hover-color);\n}\n\n.dropdown-options li svg {\n width: 24px;\n height: 24px;\n margin-right: 8px;\n padding: 0 8px;\n vertical-align: middle; /* Ensure vertical alignment */\n}\n\n/* Custom Scrollbar Styles */\n.dropdown-options::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n background-color: transparent; /* Transparent scrollbar track color */\n}\n\n.dropdown-options::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar-color);\n border-radius: 10px;\n border: 2px solid transparent;\n background-clip: content-box;\n height: 8px;\n}\n\n.dropdown-options::-webkit-scrollbar-track {\n background: transparent; /* Transparent scrollbar track color */\n}\n\n.dropdown-value {\n margin-left: 8px;\n color: var(--cpsl-color-text-secondary);\n}\n\n.dropdown-button .chevron {\n transition: transform 0.3s ease;\n}\n\n.dropdown-button .chevron.closed {\n transform: rotate(180deg);\n}\n\n.search-bar {\n padding: 0; /* Remove padding */\n border-bottom: 1px solid var(--cpsl-color-divider);\n position: sticky; /* Make the search bar sticky */\n top: 0; /* Stick to the top of the container */\n background: var(--container-background-color); /* Ensure background color matches the dropdown */\n z-index: 1; /* Ensure it stays above other items */\n}\n\n.search-bar input {\n width: 100%;\n padding: 8px; /* Add padding to match list item */\n border: none; /* Remove inner border */\n box-sizing: border-box;\n font-size: var(--input-font-size);\n color: var(--input-color);\n background-color: var(--container-background-color);\n border-radius: 0; /* Remove border radius for a flat look */\n}\n\n.search-bar input::placeholder {\n color: var(--input-placeholder-color);\n}\n\n.search-bar input:focus {\n outline: none;\n border-color: transparent; /* Ensure no border on focus */\n}\n","import { Component, Host, h, Prop, State, Element, ComponentInterface, Watch, Listen, EventEmitter, Event } from '@stencil/core';\nimport { Icons } from '../../assets/icons';\nimport { DropdownInputEventDetail } from './dropdown-interface';\n\n@Component({\n tag: 'cpsl-dropdown',\n styleUrl: 'cpsl-dropdown.scss',\n shadow: true,\n})\nexport class CpslDropdown implements ComponentInterface {\n @Element() el: HTMLCpslDropdownElement;\n\n /**\n * Width of the dropdown\n */\n @Prop() width: string = '100%';\n\n /**\n * Whether or not to include search capability\n */\n @Prop() hasCpslSearch: boolean = false;\n\n @State() isOpen: boolean = false;\n @State() searchQuery: string = '';\n @State() filteredItems: Array<DropdownInputEventDetail> = [];\n\n /**\n * Items to be presented in the dropdown\n */\n @Prop() items: Array<DropdownInputEventDetail> = [];\n\n /**\n * The selected item in the dropdown\n */\n @Prop({ mutable: true }) selectedItem?: DropdownInputEventDetail | null = null;\n\n /**\n * Event emitted when the selected item changes\n */\n @Event() selectedItemChange!: EventEmitter<DropdownInputEventDetail>;\n\n @Watch('selectedItem')\n handleSelectedItemChange(newValue: DropdownInputEventDetail | null) {\n if (newValue !== null) {\n this.selectItem(newValue, false);\n }\n }\n\n private toggleDropdown = () => {\n this.isOpen = !this.isOpen;\n };\n\n private selectItem = (item: DropdownInputEventDetail, emitEvent: boolean = true) => {\n this.selectedItem = item;\n this.isOpen = false;\n if (emitEvent) {\n this.selectedItemChange.emit(this.selectedItem);\n }\n };\n\n private handleItemSelect = (item: DropdownInputEventDetail) => () => {\n this.selectItem(item);\n };\n\n private handleSearchQueryChange = (event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n this.searchQuery = target.value;\n this.filteredItems = this.items.filter(item => item.label.toLowerCase().includes(this.searchQuery.toLowerCase()));\n };\n\n @Watch('isOpen')\n handleOpenChange() {\n if (this.isOpen) {\n this.adjustPosition();\n this.addClickOutsideListener();\n } else {\n this.removeClickOutsideListener();\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n if (this.isOpen) {\n this.adjustPosition();\n }\n }\n\n private adjustPosition() {\n const dropdownOptions = this.el.shadowRoot.querySelector('.dropdown-options') as HTMLElement;\n const parentRect = this.el.parentElement?.getBoundingClientRect();\n const searchBar = this.el.shadowRoot.querySelector('.search-bar') as HTMLElement;\n const viewportHeight = window.innerHeight;\n\n if (parentRect) {\n this.width = `${parentRect.width}px`;\n dropdownOptions.style.left = `${parentRect.x}px`;\n if (window.innerWidth <= 480) {\n searchBar.style.maxHeight = `30px`;\n dropdownOptions.style.top = `425px`;\n dropdownOptions.style.maxHeight = '110px';\n return;\n }\n dropdownOptions.style.top = `${parentRect.y + parentRect.height}px`;\n\n const availableHeight = viewportHeight - parentRect.bottom;\n dropdownOptions.style.maxHeight = `${availableHeight - 8}px`;\n }\n }\n\n private addClickOutsideListener() {\n window.addEventListener('click', this.handleClickOutside);\n }\n\n private removeClickOutsideListener() {\n window.removeEventListener('click', this.handleClickOutside);\n }\n\n private handleClickOutside = (event: MouseEvent) => {\n if (this.isOpen && !this.el.contains(event.target as Node)) {\n this.isOpen = false;\n }\n };\n\n componentWillLoad() {\n if (this.items.length > 0) {\n this.filteredItems = [...this.items];\n if (this.selectedItem !== null) {\n this.selectItem(this.selectedItem, false);\n } else {\n this.selectedItem = this.items[0];\n }\n }\n }\n\n disconnectedCallback() {\n this.removeClickOutsideListener();\n }\n\n render() {\n return (\n <Host>\n <button class=\"dropdown-button\" onClick={this.toggleDropdown}>\n {`${this.selectedItem?.selectedLabel || this.selectedItem?.label} ${this.selectedItem?.value}`}\n <div class={`chevron ${this.isOpen ? '' : 'closed'}`} innerHTML={Icons['chevronUp']} />\n </button>\n <ul class={{ 'dropdown-options': true, 'open': this.isOpen }} style={{ width: this.width }}>\n {this.hasCpslSearch && (\n <li class=\"search-bar\">\n <input type=\"text\" placeholder=\"Search...\" value={this.searchQuery} onInput={this.handleSearchQueryChange} />\n </li>\n )}\n {this.filteredItems.map(item => (\n <li onClick={this.handleItemSelect(item)}>\n <span innerHTML={Icons[item.icon]}></span>\n {item.label} <span class=\"dropdown-value\">{item.value}</span>\n </li>\n ))}\n </ul>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --container-box-shadow: none;\n --container-box-shadow-color: var(--cpsl-color-file-border-placeholder);\n --container-border-color: var(--cpsl-color-file-border-placeholder);\n --container-border-color-error: var(--cpsl-color-file-border-error);\n --container-background-color: var(--cpsl-color-file-surface-default);\n --container-background-color-disabled: var(--cpsl-color-file-surface-disabled);\n --container-background-color-drag: var(--cpsl-color-file-surface-drag);\n --container-border-width: 1px;\n --container-border-radius: var(--cpsl-border-radius-file);\n --container-padding-top: 12px;\n --container-padding-bottom: 12px;\n --container-padding-end: 12px;\n --container-padding-start: 12px;\n --container-height: 48px;\n --container-gap: 8px;\n\n --optional-label-color: var(--cpsl-color-text-secondary);\n --label-color: var(--cpsl-color-text-primary);\n --label-font-size: var(--cpsl-font-size-body-s);\n --label-margin-bottom: 0px;\n\n --helper-text-color: var(--cpsl-color-text-secondary);\n --helper-text-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-color: var(--cpsl-color-text-secondary);\n --helper-text-icon-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-size: 16px;\n --helper-text-font-size: var(--cpsl-font-size-body-xs);\n --helper-text-margin-top: 0px;\n\n --sample-img-height: 40px;\n --sample-img-width: 40px;\n --sample-img-border-radius: 8px;\n\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n font-family: $font-family-base;\n}\n\n.container {\n @include padding(var(--container-padding-top), var(--container-padding-end), var(--container-padding-bottom), var(--container-padding-start));\n\n display: flex;\n align-items: center;\n box-sizing: border-box;\n flex-wrap: wrap;\n width: 100%;\n gap: var(--container-gap);\n cursor: pointer;\n position: relative;\n\n border-style: solid;\n border-width: var(--container-border-width);\n border-color: var(--container-border-color);\n border-radius: var(--container-border-radius);\n background: var(--container-background-color);\n\n box-shadow: var(--container-box-shadow);\n\n &.drag,\n &:active {\n background: var(--container-background-color-drag);\n }\n\n &.drag-error {\n cursor: no-drop;\n }\n\n &.error {\n border-color: var(--container-border-color-error);\n }\n}\n\ninput {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n margin: 0px;\n opacity: 0;\n cursor: pointer;\n}\n\n.sample-img {\n height: var(--sample-img-height);\n width: var(--sample-img-width);\n border-radius: var(--sample-img-border-radius);\n object-fit: contain;\n}\n\n.sample-image-name-container {\n display: flex;\n gap: 4px;\n align-items: center;\n text-align: center;\n\n cpsl-icon {\n z-index: 10000;\n --height: 16px;\n --width: 16px;\n }\n}\n\n.inline-text {\n display: inline-block;\n}\n\n.sample-image-name {\n display: inline-block;\n color: var(--cpsl-color-text-tertiary);\n}\n\n.label-container {\n flex: 1;\n}\n\n.file-container {\n display: flex;\n flex-direction: column;\n flex: 1;\n gap: 8px;\n justify-content: center;\n align-items: center;\n}\n\n.label {\n display: inline-block;\n color: var(--label-color);\n font-size: var(--label-font-size);\n font-weight: 500;\n\n margin-bottom: var(--label-margin-bottom);\n}\n\n.optional-label {\n display: inline-block;\n color: var(--optional-label-color);\n // TODO: this will use a typography size once typography changes\n font-size: var(--label-font-size);\n font-weight: 500;\n}\n\n.helper-text-container {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--helper-text-color);\n font-size: var(--helper-text-font-size);\n font-weight: 500;\n\n margin-top: var(--helper-text-margin-top);\n\n cpsl-icon {\n --height: var(--helper-text-icon-size);\n --width: var(--helper-text-icon-size);\n --icon-color: var(--helper-text-icon-color);\n }\n}\n\n.error-text {\n color: var(--helper-text-error-color);\n\n cpsl-icon {\n --icon-color: var(--helper-text-icon-error-color);\n }\n}\n","import { Component, Host, Prop, Event, h, EventEmitter, State, Fragment, Element } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-file-upload',\n styleUrl: 'cpsl-file-upload.scss',\n shadow: true,\n})\nexport class CpslFileUpload {\n @Element() el!: HTMLCpslFileUploadElement;\n\n private inputId = `cpsl-file-upload-${inputIds++}`;\n\n @State() file?: File;\n @State() dragOver?: boolean;\n @State() dragError?: boolean;\n @State() isUploading?: boolean;\n @State() uploadError?: boolean;\n\n /**\n * Error text to show below the input. If this is provided the input will enter an error state.\n */\n @Prop() errorText?: string;\n\n /**\n * Filename for the external source of the selected file.\n */\n @Prop() externalFilename?: string;\n\n /**\n * External source for the selected file.\n */\n @Prop() externalSrc?: string;\n\n /**\n * Valid file types.\n */\n @Prop() fileTypes?: string[];\n\n /**\n * Helper text to show below the input. If `\"errorText\"` is provided that will take precedence.\n */\n @Prop() helperText?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label?: string;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the label will display an \"optional\" tag.\n */\n @Prop() showOptionalLabel = false;\n\n /**\n * Function to trigger file upload to server.\n * Returns: boolean indicating success or failure.\n */\n @Prop() uploadFile?: (file: File) => Promise<boolean>;\n\n /**\n * Emitted when the file is dropped in the input.\n */\n @Event() cpslOnDrop!: EventEmitter<DragEvent>;\n\n /**\n * Emitted when the file drag enters the input.\n */\n @Event() cpslOnDragEnter!: EventEmitter<DragEvent>;\n\n /**\n * Emitted when the file drag leaves the input.\n */\n @Event() cpslOnDragLeave!: EventEmitter<DragEvent>;\n\n /**\n * Emitted when the file changes.\n */\n @Event() cpslFileChange!: EventEmitter<File>;\n\n /**\n * Emitted when the file is removed.\n */\n @Event() cpslFileRemoved!: EventEmitter<void>;\n\n private handleDrop = async (ev: DragEvent) => {\n ev.preventDefault();\n\n const item = Array.from(ev.dataTransfer.items)?.[0];\n\n if (item && this.isValidFile(item.type)) {\n const file = item.getAsFile();\n await this.addFile(file);\n }\n\n this.dragOver = false;\n this.dragError = false;\n\n this.cpslOnDrop.emit(ev);\n };\n\n private handleDragEnter = (ev: DragEvent) => {\n ev.preventDefault();\n\n this.dragOver = true;\n\n const item = Array.from(ev.dataTransfer.items)?.[0];\n\n if (item && this.isValidFile(item.type)) {\n this.dragError = true;\n }\n\n this.cpslOnDragEnter.emit(ev);\n };\n\n private handleDragLeave = (ev: DragEvent) => {\n ev.preventDefault();\n\n this.dragOver = false;\n this.dragError = false;\n\n this.cpslOnDragLeave.emit(ev);\n };\n\n private handleInputChange = async (ev: Event) => {\n ev.preventDefault();\n\n const input = this.inputEl;\n\n if (input.files.length) {\n const file = input.files[0];\n\n if (this.isValidFile(file.type)) {\n await this.addFile(file);\n }\n }\n };\n\n private isValidFile = (type: string) => {\n if (this.fileTypes?.length ? !this.fileTypes.includes(type) : false) {\n return false;\n }\n\n return true;\n };\n\n private addFile = async (file: File) => {\n this.file = file;\n this.cpslFileChange.emit(file);\n this.uploadError = false;\n this.isUploading = true;\n const uploadSuccess = this.uploadFile ? await this.uploadFile(file) : true;\n if (!uploadSuccess) {\n this.uploadError = true;\n const input = this.inputEl;\n input.value = '';\n }\n this.isUploading = false;\n };\n\n private removeFile = (e: MouseEvent) => {\n e.preventDefault();\n\n this.file = undefined;\n\n const input = this.inputEl;\n input.value = '';\n\n this.cpslFileRemoved.emit();\n };\n\n get inputEl() {\n return this.el.shadowRoot.getElementById(this.inputId) as HTMLInputElement;\n }\n\n get FileContent() {\n const hasFile = Boolean(this.file) || Boolean(this.externalSrc);\n const isUploading = this.isUploading;\n const error = this.uploadError;\n\n const text = !hasFile ? (\n <Fragment>\n {'Drag file here or '}\n <cpsl-text class=\"inline-text\" variant=\"bodyXS\">\n upload file\n </cpsl-text>\n </Fragment>\n ) : isUploading ? (\n `${this.file.name} is uploading`\n ) : error ? (\n 'Upload Failed'\n ) : (\n this.file?.name || this.externalFilename || ''\n );\n const TopElement = !hasFile ? (\n <cpsl-icon icon=\"image\" />\n ) : isUploading ? (\n <cpsl-spinner />\n ) : error ? (\n <cpsl-icon icon=\"close\" />\n ) : (\n <img class=\"sample-img\" src={this.file ? URL.createObjectURL(this.file) : this.externalSrc} alt=\"Sample Image\" />\n );\n\n return (\n <Fragment>\n {TopElement}\n <span class=\"sample-image-name-container\">\n <cpsl-text class=\"sample-image-name\" variant=\"bodyXS\">\n {text}\n </cpsl-text>\n {hasFile && !error && !isUploading && <cpsl-icon icon=\"close\" onClick={this.removeFile} />}\n </span>\n </Fragment>\n );\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n {this.required ? '*' : ' '}\n {!this.required && this.showOptionalLabel ? <span class=\"optional-label\">(optional)</span> : ''}\n </label>\n )}\n <slot name=\"label\"></slot>\n <div class={{ 'container': true, 'error': Boolean(this.errorText), 'drag': this.dragOver, 'drag-error': this.dragError }}>\n <div class={{ 'label-container': true }}>\n <slot name=\"left-content\"></slot>\n </div>\n <div class={{ 'file-container': true }}>{this.FileContent}</div>\n <input\n id={this.inputId}\n type=\"file\"\n accept={this.fileTypes?.join(', ') ?? '*'}\n files={this.file ? [this.file] : undefined}\n onDrop={this.handleDrop}\n onDragEnter={this.handleDragEnter}\n onDragLeave={this.handleDragLeave}\n onChange={this.handleInputChange}\n />\n </div>\n {(this.errorText || this.helperText) && (\n <div class={{ 'helper-text-container': true, 'error-text': Boolean(this.errorText) }}>\n <span>{this.errorText ?? this.helperText}</span>\n </div>\n )}\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n","@import '../../themes/capsule.globals';\n\n:host {\n display: block;\n\n --height: 24px;\n --width: 24px;\n\n --icon-color: var(--cpsl-color-text-primary);\n --icon-fill-color: var(--cpsl-color-text-primary);\n --icon-stroke-color: var(--cpsl-color-text-primary);\n\n width: var(--width);\n height: var(--height);\n\n .foreground-0 {\n fill: var(--cpsl-color-foreground-0);\n stop-color: var(--cpsl-color-foreground-0);\n }\n .accent-0 {\n fill: var(--cpsl-color-accent-0, var(--cpsl-color-foreground-0));\n stop-color: var(--cpsl-color-accent-0, var(--cpsl-color-foreground-0));\n }\n}\n\n:host div {\n display: flex;\n\n width: var(--width);\n height: var(--height);\n\n color: var(--icon-color);\n}\n\n:host svg {\n width: var(--width);\n height: var(--height);\n\n & .background-16 {\n fill: var(--cpsl-color-background-16);\n }\n\n & .foreground-0 {\n fill: var(--cpsl-color-foreground-0);\n }\n\n & .fill {\n fill: var(--icon-fill-color);\n }\n\n & .stroke {\n stroke: var(--icon-stroke-color);\n }\n}\n\n:host img {\n width: var(--width);\n height: var(--height);\n\n object-fit: contain;\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport { IconType } from '../../interface';\nimport { Icons } from '../../assets/icons';\n\n@Component({\n tag: 'cpsl-icon',\n styleUrl: 'cpsl-icon.scss',\n shadow: true,\n})\nexport class CpslIcon {\n /**\n * The external source of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() src?: string;\n\n /**\n * The name of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() icon?: IconType;\n\n render() {\n return (\n <Host part=\"icon\" role=\"img\">\n {!this.icon ? <img src={this.src} /> : <div innerHTML={Icons[this.icon]} />}\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --container-padding-top: 4px;\n --container-padding-end: 4px;\n --container-padding-bottom: 4px;\n --container-padding-start: 4px;\n --container-border-width: 2px;\n --container-border-color: var(--cpsl-color-iconGroup-border);\n --container-background: var(--cpsl-color-iconGroup-surface);\n\n --icon-height: 15px;\n --icon-width: 15px;\n --icon-item-color: var(--cpsl-color-iconGroup-icon-default);\n\n display: flex;\n width: auto;\n padding-right: calc(var(--container-border-width) * 3);\n}\n\n.icon-container {\n @include padding(var(--container-padding-top), var(--container-padding-end), var(--container-padding-bottom), var(--container-padding-start));\n\n margin-right: calc(var(--container-border-width) * -3);\n border-style: solid;\n border-width: var(--container-border-width);\n border-color: var(--container-border-color);\n border-radius: 1000px;\n background: var(--container-background);\n\n transition: margin 250ms;\n\n cpsl-icon {\n --height: var(--icon-height);\n --width: var(--icon-width);\n --icon-color: var(--icon-item-color);\n }\n\n &.expanded {\n margin-right: calc(var(--container-border-width) * -1);\n }\n\n &.disabled {\n cpsl-icon {\n --icon-color: var(--cpsl-color-iconGroup-icon-disabled);\n }\n }\n}\n","import { Component, Host, Prop, h, Element, State } from '@stencil/core';\nimport { IconType } from '../../interface';\nimport { Icons } from '../../assets/icons';\n\nfunction isOfTypeIconType(key: string): key is IconType {\n return Object.keys(Icons).includes(key);\n}\n\n@Component({\n tag: 'cpsl-icon-group',\n styleUrl: 'cpsl-icon-group.scss',\n shadow: true,\n})\nexport class CpslIconGroup {\n @Element() el!: HTMLCpslIconGroupElement;\n\n @State() isHovered: boolean;\n\n /**\n * The direction the icons should expand from\n */\n @Prop() expandFrom: 'left' | 'right' = 'right';\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * The name of the icons to display.\n */\n @Prop() icons: (IconType | string)[];\n\n componentDidLoad() {\n this.el.addEventListener('mouseover', () => {\n this.isHovered = true;\n });\n this.el.addEventListener('mouseout', () => {\n this.isHovered = false;\n });\n }\n\n disconnectedCallback() {\n this.el.removeEventListener('mouseover', () => {\n this.isHovered = true;\n });\n this.el.removeEventListener('mouseout', () => {\n this.isHovered = false;\n });\n }\n\n render() {\n // If disabled remove all brand icons to ensure the disabled color is shown correctly\n const icons = this.disabled ? this.icons.map(icon => icon.replace('Brand', '')) : this.icons;\n\n return (\n <Host>\n {icons.map((icon, index) => {\n const isIcon = isOfTypeIconType(icon);\n\n return (\n <span\n part=\"icon-container\"\n class={{\n 'icon-container': true,\n 'expanded': !this.disabled && this.isHovered && (this.expandFrom === 'right' ? index !== this.icons.length - 1 : index === 0),\n 'disabled': this.disabled,\n }}\n style={{ zIndex: `${this.icons.length - index}` }}\n >\n <cpsl-icon key={icon} icon={isIcon ? icon : undefined} src={!isIcon ? icon : undefined} />\n </span>\n );\n })}\n </Host>\n );\n }\n}\n","/** Checks if value is string */\nfunction isString(str) {\n return typeof str === 'string' || str instanceof String;\n}\n\n/** Checks if value is object */\nfunction isObject(obj) {\n var _obj$constructor;\n return typeof obj === 'object' && obj != null && (obj == null || (_obj$constructor = obj.constructor) == null ? void 0 : _obj$constructor.name) === 'Object';\n}\nfunction pick(obj, keys) {\n if (Array.isArray(keys)) return pick(obj, (_, k) => keys.includes(k));\n return Object.entries(obj).reduce((acc, _ref) => {\n let [k, v] = _ref;\n if (keys(v, k)) acc[k] = v;\n return acc;\n }, {});\n}\n\n/** Direction */\nconst DIRECTION = {\n NONE: 'NONE',\n LEFT: 'LEFT',\n FORCE_LEFT: 'FORCE_LEFT',\n RIGHT: 'RIGHT',\n FORCE_RIGHT: 'FORCE_RIGHT'\n};\n\n/** Direction */\n\nfunction forceDirection(direction) {\n switch (direction) {\n case DIRECTION.LEFT:\n return DIRECTION.FORCE_LEFT;\n case DIRECTION.RIGHT:\n return DIRECTION.FORCE_RIGHT;\n default:\n return direction;\n }\n}\n\n/** Escapes regular expression control chars */\nfunction escapeRegExp(str) {\n return str.replace(/([.*+?^=!:${}()|[\\]/\\\\])/g, '\\\\$1');\n}\n\n// cloned from https://github.com/epoberezkin/fast-deep-equal with small changes\nfunction objectIncludes(b, a) {\n if (a === b) return true;\n const arrA = Array.isArray(a),\n arrB = Array.isArray(b);\n let i;\n if (arrA && arrB) {\n if (a.length != b.length) return false;\n for (i = 0; i < a.length; i++) if (!objectIncludes(a[i], b[i])) return false;\n return true;\n }\n if (arrA != arrB) return false;\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n const dateA = a instanceof Date,\n dateB = b instanceof Date;\n if (dateA && dateB) return a.getTime() == b.getTime();\n if (dateA != dateB) return false;\n const regexpA = a instanceof RegExp,\n regexpB = b instanceof RegExp;\n if (regexpA && regexpB) return a.toString() == b.toString();\n if (regexpA != regexpB) return false;\n const keys = Object.keys(a);\n // if (keys.length !== Object.keys(b).length) return false;\n\n for (i = 0; i < keys.length; i++) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n for (i = 0; i < keys.length; i++) if (!objectIncludes(b[keys[i]], a[keys[i]])) return false;\n return true;\n } else if (a && b && typeof a === 'function' && typeof b === 'function') {\n return a.toString() === b.toString();\n }\n return false;\n}\n\n/** Selection range */\n\nexport { DIRECTION, escapeRegExp, forceDirection, isObject, isString, objectIncludes, pick };\n","import { DIRECTION } from './utils.js';\n\n/** Provides details of changing input */\nclass ActionDetails {\n /** Current input value */\n\n /** Current cursor position */\n\n /** Old input value */\n\n /** Old selection */\n\n constructor(opts) {\n Object.assign(this, opts);\n\n // double check if left part was changed (autofilling, other non-standard input triggers)\n while (this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos)) {\n --this.oldSelection.start;\n }\n if (this.insertedCount) {\n // double check right part\n while (this.value.slice(this.cursorPos) !== this.oldValue.slice(this.oldSelection.end)) {\n if (this.value.length - this.cursorPos < this.oldValue.length - this.oldSelection.end) ++this.oldSelection.end;else ++this.cursorPos;\n }\n }\n }\n\n /** Start changing position */\n get startChangePos() {\n return Math.min(this.cursorPos, this.oldSelection.start);\n }\n\n /** Inserted symbols count */\n get insertedCount() {\n return this.cursorPos - this.startChangePos;\n }\n\n /** Inserted symbols */\n get inserted() {\n return this.value.substr(this.startChangePos, this.insertedCount);\n }\n\n /** Removed symbols count */\n get removedCount() {\n // Math.max for opposite operation\n return Math.max(this.oldSelection.end - this.startChangePos ||\n // for Delete\n this.oldValue.length - this.value.length, 0);\n }\n\n /** Removed symbols */\n get removed() {\n return this.oldValue.substr(this.startChangePos, this.removedCount);\n }\n\n /** Unchanged head symbols */\n get head() {\n return this.value.substring(0, this.startChangePos);\n }\n\n /** Unchanged tail symbols */\n get tail() {\n return this.value.substring(this.startChangePos + this.insertedCount);\n }\n\n /** Remove direction */\n get removeDirection() {\n if (!this.removedCount || this.insertedCount) return DIRECTION.NONE;\n\n // align right if delete at right\n return (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) &&\n // if not range removed (event with backspace)\n this.oldSelection.end === this.oldSelection.start ? DIRECTION.RIGHT : DIRECTION.LEFT;\n }\n}\n\nexport { ActionDetails as default };\n","/** Applies mask on element */\nfunction IMask(el, opts) {\n // currently available only for input-like elements\n return new IMask.InputMask(el, opts);\n}\n\nexport { IMask as default };\n","import { isString, isObject, pick } from '../core/utils.js';\nimport IMask from '../core/holder.js';\n\n// TODO can't use overloads here because of https://github.com/microsoft/TypeScript/issues/50754\n// export function maskedClass(mask: string): typeof MaskedPattern;\n// export function maskedClass(mask: DateConstructor): typeof MaskedDate;\n// export function maskedClass(mask: NumberConstructor): typeof MaskedNumber;\n// export function maskedClass(mask: Array<any> | ArrayConstructor): typeof MaskedDynamic;\n// export function maskedClass(mask: MaskedDate): typeof MaskedDate;\n// export function maskedClass(mask: MaskedNumber): typeof MaskedNumber;\n// export function maskedClass(mask: MaskedEnum): typeof MaskedEnum;\n// export function maskedClass(mask: MaskedRange): typeof MaskedRange;\n// export function maskedClass(mask: MaskedRegExp): typeof MaskedRegExp;\n// export function maskedClass(mask: MaskedFunction): typeof MaskedFunction;\n// export function maskedClass(mask: MaskedPattern): typeof MaskedPattern;\n// export function maskedClass(mask: MaskedDynamic): typeof MaskedDynamic;\n// export function maskedClass(mask: Masked): typeof Masked;\n// export function maskedClass(mask: typeof Masked): typeof Masked;\n// export function maskedClass(mask: typeof MaskedDate): typeof MaskedDate;\n// export function maskedClass(mask: typeof MaskedNumber): typeof MaskedNumber;\n// export function maskedClass(mask: typeof MaskedEnum): typeof MaskedEnum;\n// export function maskedClass(mask: typeof MaskedRange): typeof MaskedRange;\n// export function maskedClass(mask: typeof MaskedRegExp): typeof MaskedRegExp;\n// export function maskedClass(mask: typeof MaskedFunction): typeof MaskedFunction;\n// export function maskedClass(mask: typeof MaskedPattern): typeof MaskedPattern;\n// export function maskedClass(mask: typeof MaskedDynamic): typeof MaskedDynamic;\n// export function maskedClass<Mask extends typeof Masked> (mask: Mask): Mask;\n// export function maskedClass(mask: RegExp): typeof MaskedRegExp;\n// export function maskedClass(mask: (value: string, ...args: any[]) => boolean): typeof MaskedFunction;\n\n/** Get Masked class by mask type */\nfunction maskedClass(mask) /* TODO */{\n if (mask == null) throw new Error('mask property should be defined');\n if (mask instanceof RegExp) return IMask.MaskedRegExp;\n if (isString(mask)) return IMask.MaskedPattern;\n if (mask === Date) return IMask.MaskedDate;\n if (mask === Number) return IMask.MaskedNumber;\n if (Array.isArray(mask) || mask === Array) return IMask.MaskedDynamic;\n if (IMask.Masked && mask.prototype instanceof IMask.Masked) return mask;\n if (IMask.Masked && mask instanceof IMask.Masked) return mask.constructor;\n if (mask instanceof Function) return IMask.MaskedFunction;\n console.warn('Mask not found for mask', mask); // eslint-disable-line no-console\n return IMask.Masked;\n}\nfunction normalizeOpts(opts) {\n if (!opts) throw new Error('Options in not defined');\n if (IMask.Masked) {\n if (opts.prototype instanceof IMask.Masked) return {\n mask: opts\n };\n\n /*\n handle cases like:\n 1) opts = Masked\n 2) opts = { mask: Masked, ...instanceOpts }\n */\n const {\n mask = undefined,\n ...instanceOpts\n } = opts instanceof IMask.Masked ? {\n mask: opts\n } : isObject(opts) && opts.mask instanceof IMask.Masked ? opts : {};\n if (mask) {\n const _mask = mask.mask;\n return {\n ...pick(mask, (_, k) => !k.startsWith('_')),\n mask: mask.constructor,\n _mask,\n ...instanceOpts\n };\n }\n }\n if (!isObject(opts)) return {\n mask: opts\n };\n return {\n ...opts\n };\n}\n\n// TODO can't use overloads here because of https://github.com/microsoft/TypeScript/issues/50754\n\n// From masked\n// export default function createMask<Opts extends Masked, ReturnMasked=Opts> (opts: Opts): ReturnMasked;\n// // From masked class\n// export default function createMask<Opts extends MaskedOptions<typeof Masked>, ReturnMasked extends Masked=InstanceType<Opts['mask']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedDate>, ReturnMasked extends MaskedDate=MaskedDate<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedNumber>, ReturnMasked extends MaskedNumber=MaskedNumber<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedEnum>, ReturnMasked extends MaskedEnum=MaskedEnum<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedRange>, ReturnMasked extends MaskedRange=MaskedRange<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedRegExp>, ReturnMasked extends MaskedRegExp=MaskedRegExp<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedFunction>, ReturnMasked extends MaskedFunction=MaskedFunction<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedPattern>, ReturnMasked extends MaskedPattern=MaskedPattern<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<typeof MaskedDynamic>, ReturnMasked extends MaskedDynamic=MaskedDynamic<Opts['parent']>> (opts: Opts): ReturnMasked;\n// // From mask opts\n// export default function createMask<Opts extends MaskedOptions<Masked>, ReturnMasked=Opts extends MaskedOptions<infer M> ? M : never> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedNumberOptions, ReturnMasked extends MaskedNumber=MaskedNumber<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedDateFactoryOptions, ReturnMasked extends MaskedDate=MaskedDate<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedEnumOptions, ReturnMasked extends MaskedEnum=MaskedEnum<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedRangeOptions, ReturnMasked extends MaskedRange=MaskedRange<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedPatternOptions, ReturnMasked extends MaskedPattern=MaskedPattern<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedDynamicOptions, ReturnMasked extends MaskedDynamic=MaskedDynamic<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<RegExp>, ReturnMasked extends MaskedRegExp=MaskedRegExp<Opts['parent']>> (opts: Opts): ReturnMasked;\n// export default function createMask<Opts extends MaskedOptions<Function>, ReturnMasked extends MaskedFunction=MaskedFunction<Opts['parent']>> (opts: Opts): ReturnMasked;\n\n/** Creates new {@link Masked} depending on mask type */\nfunction createMask(opts) {\n if (IMask.Masked && opts instanceof IMask.Masked) return opts;\n const nOpts = normalizeOpts(opts);\n const MaskedClass = maskedClass(nOpts.mask);\n if (!MaskedClass) throw new Error(\"Masked class is not found for provided mask \" + nOpts.mask + \", appropriate module needs to be imported manually before creating mask.\");\n if (nOpts.mask === MaskedClass) delete nOpts.mask;\n if (nOpts._mask) {\n nOpts.mask = nOpts._mask;\n delete nOpts._mask;\n }\n return new MaskedClass(nOpts);\n}\nIMask.createMask = createMask;\n\nexport { createMask as default, maskedClass, normalizeOpts };\n","import IMask from '../core/holder.js';\n\n/** Generic element API to use with mask */\nclass MaskElement {\n /** */\n\n /** */\n\n /** */\n\n /** Safely returns selection start */\n get selectionStart() {\n let start;\n try {\n start = this._unsafeSelectionStart;\n } catch {}\n return start != null ? start : this.value.length;\n }\n\n /** Safely returns selection end */\n get selectionEnd() {\n let end;\n try {\n end = this._unsafeSelectionEnd;\n } catch {}\n return end != null ? end : this.value.length;\n }\n\n /** Safely sets element selection */\n select(start, end) {\n if (start == null || end == null || start === this.selectionStart && end === this.selectionEnd) return;\n try {\n this._unsafeSelect(start, end);\n } catch {}\n }\n\n /** */\n get isActive() {\n return false;\n }\n /** */\n\n /** */\n\n /** */\n}\nIMask.MaskElement = MaskElement;\n\nexport { MaskElement as default };\n","import MaskElement from './mask-element.js';\nimport IMask from '../core/holder.js';\n\nconst KEY_Z = 90;\nconst KEY_Y = 89;\n\n/** Bridge between HTMLElement and {@link Masked} */\nclass HTMLMaskElement extends MaskElement {\n /** HTMLElement to use mask on */\n\n constructor(input) {\n super();\n this.input = input;\n this._onKeydown = this._onKeydown.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onBeforeinput = this._onBeforeinput.bind(this);\n this._onCompositionEnd = this._onCompositionEnd.bind(this);\n }\n get rootElement() {\n var _this$input$getRootNo, _this$input$getRootNo2, _this$input;\n return (_this$input$getRootNo = (_this$input$getRootNo2 = (_this$input = this.input).getRootNode) == null ? void 0 : _this$input$getRootNo2.call(_this$input)) != null ? _this$input$getRootNo : document;\n }\n\n /** Is element in focus */\n get isActive() {\n return this.input === this.rootElement.activeElement;\n }\n\n /** Binds HTMLElement events to mask internal events */\n bindEvents(handlers) {\n this.input.addEventListener('keydown', this._onKeydown);\n this.input.addEventListener('input', this._onInput);\n this.input.addEventListener('beforeinput', this._onBeforeinput);\n this.input.addEventListener('compositionend', this._onCompositionEnd);\n this.input.addEventListener('drop', handlers.drop);\n this.input.addEventListener('click', handlers.click);\n this.input.addEventListener('focus', handlers.focus);\n this.input.addEventListener('blur', handlers.commit);\n this._handlers = handlers;\n }\n _onKeydown(e) {\n if (this._handlers.redo && (e.keyCode === KEY_Z && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode === KEY_Y && e.ctrlKey)) {\n e.preventDefault();\n return this._handlers.redo(e);\n }\n if (this._handlers.undo && e.keyCode === KEY_Z && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n return this._handlers.undo(e);\n }\n if (!e.isComposing) this._handlers.selectionChange(e);\n }\n _onBeforeinput(e) {\n if (e.inputType === 'historyUndo' && this._handlers.undo) {\n e.preventDefault();\n return this._handlers.undo(e);\n }\n if (e.inputType === 'historyRedo' && this._handlers.redo) {\n e.preventDefault();\n return this._handlers.redo(e);\n }\n }\n _onCompositionEnd(e) {\n this._handlers.input(e);\n }\n _onInput(e) {\n if (!e.isComposing) this._handlers.input(e);\n }\n\n /** Unbinds HTMLElement events to mask internal events */\n unbindEvents() {\n this.input.removeEventListener('keydown', this._onKeydown);\n this.input.removeEventListener('input', this._onInput);\n this.input.removeEventListener('beforeinput', this._onBeforeinput);\n this.input.removeEventListener('compositionend', this._onCompositionEnd);\n this.input.removeEventListener('drop', this._handlers.drop);\n this.input.removeEventListener('click', this._handlers.click);\n this.input.removeEventListener('focus', this._handlers.focus);\n this.input.removeEventListener('blur', this._handlers.commit);\n this._handlers = {};\n }\n}\nIMask.HTMLMaskElement = HTMLMaskElement;\n\nexport { HTMLMaskElement as default };\n","import HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\n/** Bridge between InputElement and {@link Masked} */\nclass HTMLInputMaskElement extends HTMLMaskElement {\n /** InputElement to use mask on */\n\n constructor(input) {\n super(input);\n this.input = input;\n }\n\n /** Returns InputElement selection start */\n get _unsafeSelectionStart() {\n return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;\n }\n\n /** Returns InputElement selection end */\n get _unsafeSelectionEnd() {\n return this.input.selectionEnd;\n }\n\n /** Sets InputElement selection */\n _unsafeSelect(start, end) {\n this.input.setSelectionRange(start, end);\n }\n get value() {\n return this.input.value;\n }\n set value(value) {\n this.input.value = value;\n }\n}\nIMask.HTMLMaskElement = HTMLMaskElement;\n\nexport { HTMLInputMaskElement as default };\n","import HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\nclass HTMLContenteditableMaskElement extends HTMLMaskElement {\n /** Returns HTMLElement selection start */\n get _unsafeSelectionStart() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Returns HTMLElement selection end */\n get _unsafeSelectionEnd() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Sets HTMLElement selection */\n _unsafeSelect(start, end) {\n if (!this.rootElement.createRange) return;\n const range = this.rootElement.createRange();\n range.setStart(this.input.firstChild || this.input, start);\n range.setEnd(this.input.lastChild || this.input, end);\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /** HTMLElement value */\n get value() {\n return this.input.textContent || '';\n }\n set value(value) {\n this.input.textContent = value;\n }\n}\nIMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;\n\nexport { HTMLContenteditableMaskElement as default };\n","class InputHistory {\n constructor() {\n this.states = [];\n this.currentIndex = 0;\n }\n get currentState() {\n return this.states[this.currentIndex];\n }\n get isEmpty() {\n return this.states.length === 0;\n }\n push(state) {\n // if current index points before the last element then remove the future\n if (this.currentIndex < this.states.length - 1) this.states.length = this.currentIndex + 1;\n this.states.push(state);\n if (this.states.length > InputHistory.MAX_LENGTH) this.states.shift();\n this.currentIndex = this.states.length - 1;\n }\n go(steps) {\n this.currentIndex = Math.min(Math.max(this.currentIndex + steps, 0), this.states.length - 1);\n return this.currentState;\n }\n undo() {\n return this.go(-1);\n }\n redo() {\n return this.go(+1);\n }\n clear() {\n this.states.length = 0;\n this.currentIndex = 0;\n }\n}\nInputHistory.MAX_LENGTH = 100;\n\nexport { InputHistory as default };\n","import { DIRECTION } from '../core/utils.js';\nimport ActionDetails from '../core/action-details.js';\nimport createMask, { maskedClass } from '../masked/factory.js';\nimport MaskElement from './mask-element.js';\nimport HTMLInputMaskElement from './html-input-mask-element.js';\nimport HTMLContenteditableMaskElement from './html-contenteditable-mask-element.js';\nimport IMask from '../core/holder.js';\nimport InputHistory from './input-history.js';\nimport './html-mask-element.js';\n\n/** Listens to element events and controls changes between element and {@link Masked} */\nclass InputMask {\n /**\n View element\n */\n\n /** Internal {@link Masked} model */\n\n constructor(el, opts) {\n this.el = el instanceof MaskElement ? el : el.isContentEditable && el.tagName !== 'INPUT' && el.tagName !== 'TEXTAREA' ? new HTMLContenteditableMaskElement(el) : new HTMLInputMaskElement(el);\n this.masked = createMask(opts);\n this._listeners = {};\n this._value = '';\n this._unmaskedValue = '';\n this._rawInputValue = '';\n this.history = new InputHistory();\n this._saveSelection = this._saveSelection.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onChange = this._onChange.bind(this);\n this._onDrop = this._onDrop.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onUndo = this._onUndo.bind(this);\n this._onRedo = this._onRedo.bind(this);\n this.alignCursor = this.alignCursor.bind(this);\n this.alignCursorFriendly = this.alignCursorFriendly.bind(this);\n this._bindEvents();\n\n // refresh\n this.updateValue();\n this._onChange();\n }\n maskEquals(mask) {\n var _this$masked;\n return mask == null || ((_this$masked = this.masked) == null ? void 0 : _this$masked.maskEquals(mask));\n }\n\n /** Masked */\n get mask() {\n return this.masked.mask;\n }\n set mask(mask) {\n if (this.maskEquals(mask)) return;\n if (!(mask instanceof IMask.Masked) && this.masked.constructor === maskedClass(mask)) {\n // TODO \"any\" no idea\n this.masked.updateOptions({\n mask\n });\n return;\n }\n const masked = mask instanceof IMask.Masked ? mask : createMask({\n mask\n });\n masked.unmaskedValue = this.masked.unmaskedValue;\n this.masked = masked;\n }\n\n /** Raw value */\n get value() {\n return this._value;\n }\n set value(str) {\n if (this.value === str) return;\n this.masked.value = str;\n this.updateControl('auto');\n }\n\n /** Unmasked value */\n get unmaskedValue() {\n return this._unmaskedValue;\n }\n set unmaskedValue(str) {\n if (this.unmaskedValue === str) return;\n this.masked.unmaskedValue = str;\n this.updateControl('auto');\n }\n\n /** Raw input value */\n get rawInputValue() {\n return this._rawInputValue;\n }\n set rawInputValue(str) {\n if (this.rawInputValue === str) return;\n this.masked.rawInputValue = str;\n this.updateControl();\n this.alignCursor();\n }\n\n /** Typed unmasked value */\n get typedValue() {\n return this.masked.typedValue;\n }\n set typedValue(val) {\n if (this.masked.typedValueEquals(val)) return;\n this.masked.typedValue = val;\n this.updateControl('auto');\n }\n\n /** Display value */\n get displayValue() {\n return this.masked.displayValue;\n }\n\n /** Starts listening to element events */\n _bindEvents() {\n this.el.bindEvents({\n selectionChange: this._saveSelection,\n input: this._onInput,\n drop: this._onDrop,\n click: this._onClick,\n focus: this._onFocus,\n commit: this._onChange,\n undo: this._onUndo,\n redo: this._onRedo\n });\n }\n\n /** Stops listening to element events */\n _unbindEvents() {\n if (this.el) this.el.unbindEvents();\n }\n\n /** Fires custom event */\n _fireEvent(ev, e) {\n const listeners = this._listeners[ev];\n if (!listeners) return;\n listeners.forEach(l => l(e));\n }\n\n /** Current selection start */\n get selectionStart() {\n return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart;\n }\n\n /** Current cursor position */\n get cursorPos() {\n return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd;\n }\n set cursorPos(pos) {\n if (!this.el || !this.el.isActive) return;\n this.el.select(pos, pos);\n this._saveSelection();\n }\n\n /** Stores current selection */\n _saveSelection( /* ev */\n ) {\n if (this.displayValue !== this.el.value) {\n console.warn('Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.'); // eslint-disable-line no-console\n }\n this._selection = {\n start: this.selectionStart,\n end: this.cursorPos\n };\n }\n\n /** Syncronizes model value from view */\n updateValue() {\n this.masked.value = this.el.value;\n this._value = this.masked.value;\n this._unmaskedValue = this.masked.unmaskedValue;\n this._rawInputValue = this.masked.rawInputValue;\n }\n\n /** Syncronizes view from model value, fires change events */\n updateControl(cursorPos) {\n const newUnmaskedValue = this.masked.unmaskedValue;\n const newValue = this.masked.value;\n const newRawInputValue = this.masked.rawInputValue;\n const newDisplayValue = this.displayValue;\n const isChanged = this.unmaskedValue !== newUnmaskedValue || this.value !== newValue || this._rawInputValue !== newRawInputValue;\n this._unmaskedValue = newUnmaskedValue;\n this._value = newValue;\n this._rawInputValue = newRawInputValue;\n if (this.el.value !== newDisplayValue) this.el.value = newDisplayValue;\n if (cursorPos === 'auto') this.alignCursor();else if (cursorPos != null) this.cursorPos = cursorPos;\n if (isChanged) this._fireChangeEvents();\n if (!this._historyChanging && (isChanged || this.history.isEmpty)) this.history.push({\n unmaskedValue: newUnmaskedValue,\n selection: {\n start: this.selectionStart,\n end: this.cursorPos\n }\n });\n }\n\n /** Updates options with deep equal check, recreates {@link Masked} model if mask type changes */\n updateOptions(opts) {\n const {\n mask,\n ...restOpts\n } = opts; // TODO types, yes, mask is optional\n\n const updateMask = !this.maskEquals(mask);\n const updateOpts = this.masked.optionsIsChanged(restOpts);\n if (updateMask) this.mask = mask;\n if (updateOpts) this.masked.updateOptions(restOpts); // TODO\n\n if (updateMask || updateOpts) this.updateControl();\n }\n\n /** Updates cursor */\n updateCursor(cursorPos) {\n if (cursorPos == null) return;\n this.cursorPos = cursorPos;\n\n // also queue change cursor for mobile browsers\n this._delayUpdateCursor(cursorPos);\n }\n\n /** Delays cursor update to support mobile browsers */\n _delayUpdateCursor(cursorPos) {\n this._abortUpdateCursor();\n this._changingCursorPos = cursorPos;\n this._cursorChanging = setTimeout(() => {\n if (!this.el) return; // if was destroyed\n this.cursorPos = this._changingCursorPos;\n this._abortUpdateCursor();\n }, 10);\n }\n\n /** Fires custom events */\n _fireChangeEvents() {\n this._fireEvent('accept', this._inputEvent);\n if (this.masked.isComplete) this._fireEvent('complete', this._inputEvent);\n }\n\n /** Aborts delayed cursor update */\n _abortUpdateCursor() {\n if (this._cursorChanging) {\n clearTimeout(this._cursorChanging);\n delete this._cursorChanging;\n }\n }\n\n /** Aligns cursor to nearest available position */\n alignCursor() {\n this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT));\n }\n\n /** Aligns cursor only if selection is empty */\n alignCursorFriendly() {\n if (this.selectionStart !== this.cursorPos) return; // skip if range is selected\n this.alignCursor();\n }\n\n /** Adds listener on custom event */\n on(ev, handler) {\n if (!this._listeners[ev]) this._listeners[ev] = [];\n this._listeners[ev].push(handler);\n return this;\n }\n\n /** Removes custom event listener */\n off(ev, handler) {\n if (!this._listeners[ev]) return this;\n if (!handler) {\n delete this._listeners[ev];\n return this;\n }\n const hIndex = this._listeners[ev].indexOf(handler);\n if (hIndex >= 0) this._listeners[ev].splice(hIndex, 1);\n return this;\n }\n\n /** Handles view input event */\n _onInput(e) {\n this._inputEvent = e;\n this._abortUpdateCursor();\n const details = new ActionDetails({\n // new state\n value: this.el.value,\n cursorPos: this.cursorPos,\n // old state\n oldValue: this.displayValue,\n oldSelection: this._selection\n });\n const oldRawValue = this.masked.rawInputValue;\n const offset = this.masked.splice(details.startChangePos, details.removed.length, details.inserted, details.removeDirection, {\n input: true,\n raw: true\n }).offset;\n\n // force align in remove direction only if no input chars were removed\n // otherwise we still need to align with NONE (to get out from fixed symbols for instance)\n const removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE;\n let cursorPos = this.masked.nearestInputPos(details.startChangePos + offset, removeDirection);\n if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE);\n this.updateControl(cursorPos);\n delete this._inputEvent;\n }\n\n /** Handles view change event and commits model value */\n _onChange() {\n if (this.displayValue !== this.el.value) this.updateValue();\n this.masked.doCommit();\n this.updateControl();\n this._saveSelection();\n }\n\n /** Handles view drop event, prevents by default */\n _onDrop(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n /** Restore last selection on focus */\n _onFocus(ev) {\n this.alignCursorFriendly();\n }\n\n /** Restore last selection on focus */\n _onClick(ev) {\n this.alignCursorFriendly();\n }\n _onUndo() {\n this._applyHistoryState(this.history.undo());\n }\n _onRedo() {\n this._applyHistoryState(this.history.redo());\n }\n _applyHistoryState(state) {\n if (!state) return;\n this._historyChanging = true;\n this.unmaskedValue = state.unmaskedValue;\n this.el.select(state.selection.start, state.selection.end);\n this._saveSelection();\n this._historyChanging = false;\n }\n\n /** Unbind view events and removes element reference */\n destroy() {\n this._unbindEvents();\n this._listeners.length = 0;\n delete this.el;\n }\n}\nIMask.InputMask = InputMask;\n\nexport { InputMask as default };\n","import IMask from './holder.js';\n\n/** Provides details of changing model value */\nclass ChangeDetails {\n /** Inserted symbols */\n\n /** Additional offset if any changes occurred before tail */\n\n /** Raw inserted is used by dynamic mask */\n\n /** Can skip chars */\n\n static normalize(prep) {\n return Array.isArray(prep) ? prep : [prep, new ChangeDetails()];\n }\n constructor(details) {\n Object.assign(this, {\n inserted: '',\n rawInserted: '',\n tailShift: 0,\n skip: false\n }, details);\n }\n\n /** Aggregate changes */\n aggregate(details) {\n this.inserted += details.inserted;\n this.rawInserted += details.rawInserted;\n this.tailShift += details.tailShift;\n this.skip = this.skip || details.skip;\n return this;\n }\n\n /** Total offset considering all changes */\n get offset() {\n return this.tailShift + this.inserted.length;\n }\n get consumed() {\n return Boolean(this.rawInserted) || this.skip;\n }\n equals(details) {\n return this.inserted === details.inserted && this.tailShift === details.tailShift && this.rawInserted === details.rawInserted && this.skip === details.skip;\n }\n}\nIMask.ChangeDetails = ChangeDetails;\n\nexport { ChangeDetails as default };\n","/** Provides details of continuous extracted tail */\nclass ContinuousTailDetails {\n /** Tail value as string */\n\n /** Tail start position */\n\n /** Start position */\n\n constructor(value, from, stop) {\n if (value === void 0) {\n value = '';\n }\n if (from === void 0) {\n from = 0;\n }\n this.value = value;\n this.from = from;\n this.stop = stop;\n }\n toString() {\n return this.value;\n }\n extend(tail) {\n this.value += String(tail);\n }\n appendTo(masked) {\n return masked.append(this.toString(), {\n tail: true\n }).aggregate(masked._appendPlaceholder());\n }\n get state() {\n return {\n value: this.value,\n from: this.from,\n stop: this.stop\n };\n }\n set state(state) {\n Object.assign(this, state);\n }\n unshift(beforePos) {\n if (!this.value.length || beforePos != null && this.from >= beforePos) return '';\n const shiftChar = this.value[0];\n this.value = this.value.slice(1);\n return shiftChar;\n }\n shift() {\n if (!this.value.length) return '';\n const shiftChar = this.value[this.value.length - 1];\n this.value = this.value.slice(0, -1);\n return shiftChar;\n }\n}\n\nexport { ContinuousTailDetails as default };\n","import ChangeDetails from '../core/change-details.js';\nimport ContinuousTailDetails from '../core/continuous-tail-details.js';\nimport { isString, DIRECTION, objectIncludes, forceDirection } from '../core/utils.js';\nimport IMask from '../core/holder.js';\n\n/** Append flags */\n\n/** Extract flags */\n\n// see https://github.com/microsoft/TypeScript/issues/6223\n\n/** Provides common masking stuff */\nclass Masked {\n /** */\n\n /** */\n\n /** Transforms value before mask processing */\n\n /** Transforms each char before mask processing */\n\n /** Validates if value is acceptable */\n\n /** Does additional processing at the end of editing */\n\n /** Format typed value to string */\n\n /** Parse string to get typed value */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n this._value = '';\n this._update({\n ...Masked.DEFAULTS,\n ...opts\n });\n this._initialized = true;\n }\n\n /** Sets and applies new options */\n updateOptions(opts) {\n if (!this.optionsIsChanged(opts)) return;\n this.withValueRefresh(this._update.bind(this, opts));\n }\n\n /** Sets new options */\n _update(opts) {\n Object.assign(this, opts);\n }\n\n /** Mask state */\n get state() {\n return {\n _value: this.value,\n _rawInputValue: this.rawInputValue\n };\n }\n set state(state) {\n this._value = state._value;\n }\n\n /** Resets value */\n reset() {\n this._value = '';\n }\n get value() {\n return this._value;\n }\n set value(value) {\n this.resolve(value, {\n input: true\n });\n }\n\n /** Resolve new value */\n resolve(value, flags) {\n if (flags === void 0) {\n flags = {\n input: true\n };\n }\n this.reset();\n this.append(value, flags, '');\n this.doCommit();\n }\n get unmaskedValue() {\n return this.value;\n }\n set unmaskedValue(value) {\n this.resolve(value, {});\n }\n get typedValue() {\n return this.parse ? this.parse(this.value, this) : this.unmaskedValue;\n }\n set typedValue(value) {\n if (this.format) {\n this.value = this.format(value, this);\n } else {\n this.unmaskedValue = String(value);\n }\n }\n\n /** Value that includes raw user input */\n get rawInputValue() {\n return this.extractInput(0, this.displayValue.length, {\n raw: true\n });\n }\n set rawInputValue(value) {\n this.resolve(value, {\n raw: true\n });\n }\n get displayValue() {\n return this.value;\n }\n get isComplete() {\n return true;\n }\n get isFilled() {\n return this.isComplete;\n }\n\n /** Finds nearest input position in direction */\n nearestInputPos(cursorPos, direction) {\n return cursorPos;\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n return Math.min(this.displayValue.length, toPos - fromPos);\n }\n\n /** Extracts value in range considering flags */\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n return this.displayValue.slice(fromPos, toPos);\n }\n\n /** Extracts tail in range */\n extractTail(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n return new ContinuousTailDetails(this.extractInput(fromPos, toPos), fromPos);\n }\n\n /** Appends tail */\n appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n\n /** Appends char */\n _appendCharRaw(ch, flags) {\n if (!ch) return new ChangeDetails();\n this._value += ch;\n return new ChangeDetails({\n inserted: ch,\n rawInserted: ch\n });\n }\n\n /** Appends char */\n _appendChar(ch, flags, checkTail) {\n if (flags === void 0) {\n flags = {};\n }\n const consistentState = this.state;\n let details;\n [ch, details] = this.doPrepareChar(ch, flags);\n if (ch) {\n details = details.aggregate(this._appendCharRaw(ch, flags));\n\n // TODO handle `skip`?\n\n // try `autofix` lookahead\n if (!details.rawInserted && this.autofix === 'pad') {\n const noFixState = this.state;\n this.state = consistentState;\n let fixDetails = this.pad(flags);\n const chDetails = this._appendCharRaw(ch, flags);\n fixDetails = fixDetails.aggregate(chDetails);\n\n // if fix was applied or\n // if details are equal use skip restoring state optimization\n if (chDetails.rawInserted || fixDetails.equals(details)) {\n details = fixDetails;\n } else {\n this.state = noFixState;\n }\n }\n }\n if (details.inserted) {\n let consistentTail;\n let appended = this.doValidate(flags) !== false;\n if (appended && checkTail != null) {\n // validation ok, check tail\n const beforeTailState = this.state;\n if (this.overwrite === true) {\n consistentTail = checkTail.state;\n for (let i = 0; i < details.rawInserted.length; ++i) {\n checkTail.unshift(this.displayValue.length - details.tailShift);\n }\n }\n let tailDetails = this.appendTail(checkTail);\n appended = tailDetails.rawInserted.length === checkTail.toString().length;\n\n // not ok, try shift\n if (!(appended && tailDetails.inserted) && this.overwrite === 'shift') {\n this.state = beforeTailState;\n consistentTail = checkTail.state;\n for (let i = 0; i < details.rawInserted.length; ++i) {\n checkTail.shift();\n }\n tailDetails = this.appendTail(checkTail);\n appended = tailDetails.rawInserted.length === checkTail.toString().length;\n }\n\n // if ok, rollback state after tail\n if (appended && tailDetails.inserted) this.state = beforeTailState;\n }\n\n // revert all if something went wrong\n if (!appended) {\n details = new ChangeDetails();\n this.state = consistentState;\n if (checkTail && consistentTail) checkTail.state = consistentTail;\n }\n }\n return details;\n }\n\n /** Appends optional placeholder at the end */\n _appendPlaceholder() {\n return new ChangeDetails();\n }\n\n /** Appends optional eager placeholder at the end */\n _appendEager() {\n return new ChangeDetails();\n }\n\n /** Appends symbols considering flags */\n append(str, flags, tail) {\n if (!isString(str)) throw new Error('value should be string');\n const checkTail = isString(tail) ? new ContinuousTailDetails(String(tail)) : tail;\n if (flags != null && flags.tail) flags._beforeTailState = this.state;\n let details;\n [str, details] = this.doPrepare(str, flags);\n for (let ci = 0; ci < str.length; ++ci) {\n const d = this._appendChar(str[ci], flags, checkTail);\n if (!d.rawInserted && !this.doSkipInvalid(str[ci], flags, checkTail)) break;\n details.aggregate(d);\n }\n if ((this.eager === true || this.eager === 'append') && flags != null && flags.input && str) {\n details.aggregate(this._appendEager());\n }\n\n // append tail but aggregate only tailShift\n if (checkTail != null) {\n details.tailShift += this.appendTail(checkTail).tailShift;\n // TODO it's a good idea to clear state after appending ends\n // but it causes bugs when one append calls another (when dynamic dispatch set rawInputValue)\n // this._resetBeforeTailState();\n }\n return details;\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n this._value = this.displayValue.slice(0, fromPos) + this.displayValue.slice(toPos);\n return new ChangeDetails();\n }\n\n /** Calls function and reapplies current value */\n withValueRefresh(fn) {\n if (this._refreshing || !this._initialized) return fn();\n this._refreshing = true;\n const rawInput = this.rawInputValue;\n const value = this.value;\n const ret = fn();\n this.rawInputValue = rawInput;\n // append lost trailing chars at the end\n if (this.value && this.value !== value && value.indexOf(this.value) === 0) {\n this.append(value.slice(this.displayValue.length), {}, '');\n this.doCommit();\n }\n delete this._refreshing;\n return ret;\n }\n runIsolated(fn) {\n if (this._isolated || !this._initialized) return fn(this);\n this._isolated = true;\n const state = this.state;\n const ret = fn(this);\n this.state = state;\n delete this._isolated;\n return ret;\n }\n doSkipInvalid(ch, flags, checkTail) {\n return Boolean(this.skipInvalid);\n }\n\n /** Prepares string before mask processing */\n doPrepare(str, flags) {\n if (flags === void 0) {\n flags = {};\n }\n return ChangeDetails.normalize(this.prepare ? this.prepare(str, this, flags) : str);\n }\n\n /** Prepares each char before mask processing */\n doPrepareChar(str, flags) {\n if (flags === void 0) {\n flags = {};\n }\n return ChangeDetails.normalize(this.prepareChar ? this.prepareChar(str, this, flags) : str);\n }\n\n /** Validates if value is acceptable */\n doValidate(flags) {\n return (!this.validate || this.validate(this.value, this, flags)) && (!this.parent || this.parent.doValidate(flags));\n }\n\n /** Does additional processing at the end of editing */\n doCommit() {\n if (this.commit) this.commit(this.value, this);\n }\n splice(start, deleteCount, inserted, removeDirection, flags) {\n if (inserted === void 0) {\n inserted = '';\n }\n if (removeDirection === void 0) {\n removeDirection = DIRECTION.NONE;\n }\n if (flags === void 0) {\n flags = {\n input: true\n };\n }\n const tailPos = start + deleteCount;\n const tail = this.extractTail(tailPos);\n const eagerRemove = this.eager === true || this.eager === 'remove';\n let oldRawValue;\n if (eagerRemove) {\n removeDirection = forceDirection(removeDirection);\n oldRawValue = this.extractInput(0, tailPos, {\n raw: true\n });\n }\n let startChangePos = start;\n const details = new ChangeDetails();\n\n // if it is just deletion without insertion\n if (removeDirection !== DIRECTION.NONE) {\n startChangePos = this.nearestInputPos(start, deleteCount > 1 && start !== 0 && !eagerRemove ? DIRECTION.NONE : removeDirection);\n\n // adjust tailShift if start was aligned\n details.tailShift = startChangePos - start;\n }\n details.aggregate(this.remove(startChangePos));\n if (eagerRemove && removeDirection !== DIRECTION.NONE && oldRawValue === this.rawInputValue) {\n if (removeDirection === DIRECTION.FORCE_LEFT) {\n let valLength;\n while (oldRawValue === this.rawInputValue && (valLength = this.displayValue.length)) {\n details.aggregate(new ChangeDetails({\n tailShift: -1\n })).aggregate(this.remove(valLength - 1));\n }\n } else if (removeDirection === DIRECTION.FORCE_RIGHT) {\n tail.unshift();\n }\n }\n return details.aggregate(this.append(inserted, flags, tail));\n }\n maskEquals(mask) {\n return this.mask === mask;\n }\n optionsIsChanged(opts) {\n return !objectIncludes(this, opts);\n }\n typedValueEquals(value) {\n const tval = this.typedValue;\n return value === tval || Masked.EMPTY_VALUES.includes(value) && Masked.EMPTY_VALUES.includes(tval) || (this.format ? this.format(value, this) === this.format(this.typedValue, this) : false);\n }\n pad(flags) {\n return new ChangeDetails();\n }\n}\nMasked.DEFAULTS = {\n skipInvalid: true\n};\nMasked.EMPTY_VALUES = [undefined, null, ''];\nIMask.Masked = Masked;\n\nexport { Masked as default };\n","import ChangeDetails from '../../core/change-details.js';\nimport { isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport IMask from '../../core/holder.js';\n\nclass ChunksTailDetails {\n /** */\n\n constructor(chunks, from) {\n if (chunks === void 0) {\n chunks = [];\n }\n if (from === void 0) {\n from = 0;\n }\n this.chunks = chunks;\n this.from = from;\n }\n toString() {\n return this.chunks.map(String).join('');\n }\n extend(tailChunk) {\n if (!String(tailChunk)) return;\n tailChunk = isString(tailChunk) ? new ContinuousTailDetails(String(tailChunk)) : tailChunk;\n const lastChunk = this.chunks[this.chunks.length - 1];\n const extendLast = lastChunk && (\n // if stops are same or tail has no stop\n lastChunk.stop === tailChunk.stop || tailChunk.stop == null) &&\n // if tail chunk goes just after last chunk\n tailChunk.from === lastChunk.from + lastChunk.toString().length;\n if (tailChunk instanceof ContinuousTailDetails) {\n // check the ability to extend previous chunk\n if (extendLast) {\n // extend previous chunk\n lastChunk.extend(tailChunk.toString());\n } else {\n // append new chunk\n this.chunks.push(tailChunk);\n }\n } else if (tailChunk instanceof ChunksTailDetails) {\n if (tailChunk.stop == null) {\n // unwrap floating chunks to parent, keeping `from` pos\n let firstTailChunk;\n while (tailChunk.chunks.length && tailChunk.chunks[0].stop == null) {\n firstTailChunk = tailChunk.chunks.shift(); // not possible to be `undefined` because length was checked above\n firstTailChunk.from += tailChunk.from;\n this.extend(firstTailChunk);\n }\n }\n\n // if tail chunk still has value\n if (tailChunk.toString()) {\n // if chunks contains stops, then popup stop to container\n tailChunk.stop = tailChunk.blockIndex;\n this.chunks.push(tailChunk);\n }\n }\n }\n appendTo(masked) {\n if (!(masked instanceof IMask.MaskedPattern)) {\n const tail = new ContinuousTailDetails(this.toString());\n return tail.appendTo(masked);\n }\n const details = new ChangeDetails();\n for (let ci = 0; ci < this.chunks.length; ++ci) {\n const chunk = this.chunks[ci];\n const lastBlockIter = masked._mapPosToBlock(masked.displayValue.length);\n const stop = chunk.stop;\n let chunkBlock;\n if (stop != null && (\n // if block not found or stop is behind lastBlock\n !lastBlockIter || lastBlockIter.index <= stop)) {\n if (chunk instanceof ChunksTailDetails ||\n // for continuous block also check if stop is exist\n masked._stops.indexOf(stop) >= 0) {\n details.aggregate(masked._appendPlaceholder(stop));\n }\n chunkBlock = chunk instanceof ChunksTailDetails && masked._blocks[stop];\n }\n if (chunkBlock) {\n const tailDetails = chunkBlock.appendTail(chunk);\n details.aggregate(tailDetails);\n\n // get not inserted chars\n const remainChars = chunk.toString().slice(tailDetails.rawInserted.length);\n if (remainChars) details.aggregate(masked.append(remainChars, {\n tail: true\n }));\n } else {\n details.aggregate(masked.append(chunk.toString(), {\n tail: true\n }));\n }\n }\n return details;\n }\n get state() {\n return {\n chunks: this.chunks.map(c => c.state),\n from: this.from,\n stop: this.stop,\n blockIndex: this.blockIndex\n };\n }\n set state(state) {\n const {\n chunks,\n ...props\n } = state;\n Object.assign(this, props);\n this.chunks = chunks.map(cstate => {\n const chunk = \"chunks\" in cstate ? new ChunksTailDetails() : new ContinuousTailDetails();\n chunk.state = cstate;\n return chunk;\n });\n }\n unshift(beforePos) {\n if (!this.chunks.length || beforePos != null && this.from >= beforePos) return '';\n const chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos;\n let ci = 0;\n while (ci < this.chunks.length) {\n const chunk = this.chunks[ci];\n const shiftChar = chunk.unshift(chunkShiftPos);\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n ++ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n if (shiftChar) return shiftChar;\n }\n return '';\n }\n shift() {\n if (!this.chunks.length) return '';\n let ci = this.chunks.length - 1;\n while (0 <= ci) {\n const chunk = this.chunks[ci];\n const shiftChar = chunk.shift();\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n --ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n if (shiftChar) return shiftChar;\n }\n return '';\n }\n}\n\nexport { ChunksTailDetails as default };\n","import { DIRECTION } from '../../core/utils.js';\n\nclass PatternCursor {\n constructor(masked, pos) {\n this.masked = masked;\n this._log = [];\n const {\n offset,\n index\n } = masked._mapPosToBlock(pos) || (pos < 0 ?\n // first\n {\n index: 0,\n offset: 0\n } :\n // last\n {\n index: this.masked._blocks.length,\n offset: 0\n });\n this.offset = offset;\n this.index = index;\n this.ok = false;\n }\n get block() {\n return this.masked._blocks[this.index];\n }\n get pos() {\n return this.masked._blockStartPos(this.index) + this.offset;\n }\n get state() {\n return {\n index: this.index,\n offset: this.offset,\n ok: this.ok\n };\n }\n set state(s) {\n Object.assign(this, s);\n }\n pushState() {\n this._log.push(this.state);\n }\n popState() {\n const s = this._log.pop();\n if (s) this.state = s;\n return s;\n }\n bindBlock() {\n if (this.block) return;\n if (this.index < 0) {\n this.index = 0;\n this.offset = 0;\n }\n if (this.index >= this.masked._blocks.length) {\n this.index = this.masked._blocks.length - 1;\n this.offset = this.block.displayValue.length; // TODO this is stupid type error, `block` depends on index that was changed above\n }\n }\n _pushLeft(fn) {\n this.pushState();\n for (this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((_this$block = this.block) == null ? void 0 : _this$block.displayValue.length) || 0) {\n var _this$block;\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n _pushRight(fn) {\n this.pushState();\n for (this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0) {\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n pushLeftBeforeFilled() {\n return this._pushLeft(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_LEFT);\n if (this.offset !== 0) return true;\n });\n }\n pushLeftBeforeInput() {\n // cases:\n // filled input: 00|\n // optional empty input: 00[]|\n // nested block: XX<[]>|\n return this._pushLeft(() => {\n if (this.block.isFixed) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushLeftBeforeRequired() {\n return this._pushLeft(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushRightBeforeFilled() {\n return this._pushRight(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_RIGHT);\n if (this.offset !== this.block.value.length) return true;\n });\n }\n pushRightBeforeInput() {\n return this._pushRight(() => {\n if (this.block.isFixed) return;\n\n // const o = this.offset;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n // HACK cases like (STILL DOES NOT WORK FOR NESTED)\n // aa|X\n // aa<X|[]>X_ - this will not work\n // if (o && o === this.offset && this.block instanceof PatternInputDefinition) continue;\n return true;\n });\n }\n pushRightBeforeRequired() {\n return this._pushRight(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n\n // TODO check |[*]XX_\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n return true;\n });\n }\n}\n\nexport { PatternCursor as default };\n","import ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION, isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport '../../core/holder.js';\n\nclass PatternFixedDefinition {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n Object.assign(this, opts);\n this._value = '';\n this.isFixed = true;\n }\n get value() {\n return this._value;\n }\n get unmaskedValue() {\n return this.isUnmasking ? this.value : '';\n }\n get rawInputValue() {\n return this._isRawInput ? this.value : '';\n }\n get displayValue() {\n return this.value;\n }\n reset() {\n this._isRawInput = false;\n this._value = '';\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n this._value = this._value.slice(0, fromPos) + this._value.slice(toPos);\n if (!this._value) this._isRawInput = false;\n return new ChangeDetails();\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n const minPos = 0;\n const maxPos = this._value.length;\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return minPos;\n case DIRECTION.NONE:\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n default:\n return maxPos;\n }\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n return this._isRawInput ? toPos - fromPos : 0;\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n if (flags === void 0) {\n flags = {};\n }\n return flags.raw && this._isRawInput && this._value.slice(fromPos, toPos) || '';\n }\n get isComplete() {\n return true;\n }\n get isFilled() {\n return Boolean(this._value);\n }\n _appendChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n if (this.isFilled) return new ChangeDetails();\n const appendEager = this.eager === true || this.eager === 'append';\n const appended = this.char === ch;\n const isResolved = appended && (this.isUnmasking || flags.input || flags.raw) && (!flags.raw || !appendEager) && !flags.tail;\n const details = new ChangeDetails({\n inserted: this.char,\n rawInserted: isResolved ? this.char : ''\n });\n this._value = this.char;\n this._isRawInput = isResolved && (flags.raw || flags.input);\n return details;\n }\n _appendEager() {\n return this._appendChar(this.char, {\n tail: true\n });\n }\n _appendPlaceholder() {\n const details = new ChangeDetails();\n if (this.isFilled) return details;\n this._value = details.inserted = this.char;\n return details;\n }\n extractTail() {\n return new ContinuousTailDetails('');\n }\n appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n append(str, flags, tail) {\n const details = this._appendChar(str[0], flags);\n if (tail != null) {\n details.tailShift += this.appendTail(tail).tailShift;\n }\n return details;\n }\n doCommit() {}\n get state() {\n return {\n _value: this._value,\n _rawInputValue: this.rawInputValue\n };\n }\n set state(state) {\n this._value = state._value;\n this._isRawInput = Boolean(state._rawInputValue);\n }\n pad(flags) {\n return this._appendPlaceholder();\n }\n}\n\nexport { PatternFixedDefinition as default };\n","import createMask from '../factory.js';\nimport ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION } from '../../core/utils.js';\nimport '../../core/holder.js';\n\nclass PatternInputDefinition {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n const {\n parent,\n isOptional,\n placeholderChar,\n displayChar,\n lazy,\n eager,\n ...maskOpts\n } = opts;\n this.masked = createMask(maskOpts);\n Object.assign(this, {\n parent,\n isOptional,\n placeholderChar,\n displayChar,\n lazy,\n eager\n });\n }\n reset() {\n this.isFilled = false;\n this.masked.reset();\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.value.length;\n }\n if (fromPos === 0 && toPos >= 1) {\n this.isFilled = false;\n return this.masked.remove(fromPos, toPos);\n }\n return new ChangeDetails();\n }\n get value() {\n return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : '');\n }\n get unmaskedValue() {\n return this.masked.unmaskedValue;\n }\n get rawInputValue() {\n return this.masked.rawInputValue;\n }\n get displayValue() {\n return this.masked.value && this.displayChar || this.value;\n }\n get isComplete() {\n return Boolean(this.masked.value) || this.isOptional;\n }\n _appendChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n if (this.isFilled) return new ChangeDetails();\n const state = this.masked.state;\n // simulate input\n let details = this.masked._appendChar(ch, this.currentMaskFlags(flags));\n if (details.inserted && this.doValidate(flags) === false) {\n details = new ChangeDetails();\n this.masked.state = state;\n }\n if (!details.inserted && !this.isOptional && !this.lazy && !flags.input) {\n details.inserted = this.placeholderChar;\n }\n details.skip = !details.inserted && !this.isOptional;\n this.isFilled = Boolean(details.inserted);\n return details;\n }\n append(str, flags, tail) {\n // TODO probably should be done via _appendChar\n return this.masked.append(str, this.currentMaskFlags(flags), tail);\n }\n _appendPlaceholder() {\n if (this.isFilled || this.isOptional) return new ChangeDetails();\n this.isFilled = true;\n return new ChangeDetails({\n inserted: this.placeholderChar\n });\n }\n _appendEager() {\n return new ChangeDetails();\n }\n extractTail(fromPos, toPos) {\n return this.masked.extractTail(fromPos, toPos);\n }\n appendTail(tail) {\n return this.masked.appendTail(tail);\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.value.length;\n }\n return this.masked.extractInput(fromPos, toPos, flags);\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n const minPos = 0;\n const maxPos = this.value.length;\n const boundPos = Math.min(Math.max(cursorPos, minPos), maxPos);\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return this.isComplete ? boundPos : minPos;\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n return this.isComplete ? boundPos : maxPos;\n case DIRECTION.NONE:\n default:\n return boundPos;\n }\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.value.length;\n }\n return this.value.slice(fromPos, toPos).length;\n }\n doValidate(flags) {\n return this.masked.doValidate(this.currentMaskFlags(flags)) && (!this.parent || this.parent.doValidate(this.currentMaskFlags(flags)));\n }\n doCommit() {\n this.masked.doCommit();\n }\n get state() {\n return {\n _value: this.value,\n _rawInputValue: this.rawInputValue,\n masked: this.masked.state,\n isFilled: this.isFilled\n };\n }\n set state(state) {\n this.masked.state = state.masked;\n this.isFilled = state.isFilled;\n }\n currentMaskFlags(flags) {\n var _flags$_beforeTailSta;\n return {\n ...flags,\n _beforeTailState: (flags == null || (_flags$_beforeTailSta = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta.masked) || (flags == null ? void 0 : flags._beforeTailState)\n };\n }\n pad(flags) {\n return new ChangeDetails();\n }\n}\nPatternInputDefinition.DEFAULT_DEFINITIONS = {\n '0': /\\d/,\n 'a': /[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\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-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,\n // http://stackoverflow.com/a/22075070\n '*': /./\n};\n\nexport { PatternInputDefinition as default };\n","import Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/change-details.js';\nimport '../core/continuous-tail-details.js';\nimport '../core/utils.js';\n\n/** Masking by RegExp */\nclass MaskedRegExp extends Masked {\n /** */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n const mask = opts.mask;\n if (mask) opts.validate = value => value.search(mask) >= 0;\n super._update(opts);\n }\n}\nIMask.MaskedRegExp = MaskedRegExp;\n\nexport { MaskedRegExp as default };\n","import ChangeDetails from '../core/change-details.js';\nimport IMask from '../core/holder.js';\nimport { DIRECTION } from '../core/utils.js';\nimport Masked from './base.js';\nimport createMask, { normalizeOpts } from './factory.js';\nimport ChunksTailDetails from './pattern/chunk-tail-details.js';\nimport PatternCursor from './pattern/cursor.js';\nimport PatternFixedDefinition from './pattern/fixed-definition.js';\nimport PatternInputDefinition from './pattern/input-definition.js';\nimport './regexp.js';\nimport '../core/continuous-tail-details.js';\n\n/** Pattern mask */\nclass MaskedPattern extends Masked {\n /** */\n\n /** */\n\n /** Single char for empty input */\n\n /** Single char for filled input */\n\n /** Show placeholder only when needed */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n super({\n ...MaskedPattern.DEFAULTS,\n ...opts,\n definitions: Object.assign({}, PatternInputDefinition.DEFAULT_DEFINITIONS, opts == null ? void 0 : opts.definitions)\n });\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n opts.definitions = Object.assign({}, this.definitions, opts.definitions);\n super._update(opts);\n this._rebuildMask();\n }\n _rebuildMask() {\n const defs = this.definitions;\n this._blocks = [];\n this.exposeBlock = undefined;\n this._stops = [];\n this._maskedBlocks = {};\n const pattern = this.mask;\n if (!pattern || !defs) return;\n let unmaskingBlock = false;\n let optionalBlock = false;\n for (let i = 0; i < pattern.length; ++i) {\n if (this.blocks) {\n const p = pattern.slice(i);\n const bNames = Object.keys(this.blocks).filter(bName => p.indexOf(bName) === 0);\n // order by key length\n bNames.sort((a, b) => b.length - a.length);\n // use block name with max length\n const bName = bNames[0];\n if (bName) {\n const {\n expose,\n repeat,\n ...bOpts\n } = normalizeOpts(this.blocks[bName]); // TODO type Opts<Arg & Extra>\n const blockOpts = {\n lazy: this.lazy,\n eager: this.eager,\n placeholderChar: this.placeholderChar,\n displayChar: this.displayChar,\n overwrite: this.overwrite,\n autofix: this.autofix,\n ...bOpts,\n repeat,\n parent: this\n };\n const maskedBlock = repeat != null ? new IMask.RepeatBlock(blockOpts /* TODO */) : createMask(blockOpts);\n if (maskedBlock) {\n this._blocks.push(maskedBlock);\n if (expose) this.exposeBlock = maskedBlock;\n\n // store block index\n if (!this._maskedBlocks[bName]) this._maskedBlocks[bName] = [];\n this._maskedBlocks[bName].push(this._blocks.length - 1);\n }\n i += bName.length - 1;\n continue;\n }\n }\n let char = pattern[i];\n let isInput = (char in defs);\n if (char === MaskedPattern.STOP_CHAR) {\n this._stops.push(this._blocks.length);\n continue;\n }\n if (char === '{' || char === '}') {\n unmaskingBlock = !unmaskingBlock;\n continue;\n }\n if (char === '[' || char === ']') {\n optionalBlock = !optionalBlock;\n continue;\n }\n if (char === MaskedPattern.ESCAPE_CHAR) {\n ++i;\n char = pattern[i];\n if (!char) break;\n isInput = false;\n }\n const def = isInput ? new PatternInputDefinition({\n isOptional: optionalBlock,\n lazy: this.lazy,\n eager: this.eager,\n placeholderChar: this.placeholderChar,\n displayChar: this.displayChar,\n ...normalizeOpts(defs[char]),\n parent: this\n }) : new PatternFixedDefinition({\n char,\n eager: this.eager,\n isUnmasking: unmaskingBlock\n });\n this._blocks.push(def);\n }\n }\n get state() {\n return {\n ...super.state,\n _blocks: this._blocks.map(b => b.state)\n };\n }\n set state(state) {\n if (!state) {\n this.reset();\n return;\n }\n const {\n _blocks,\n ...maskedState\n } = state;\n this._blocks.forEach((b, bi) => b.state = _blocks[bi]);\n super.state = maskedState;\n }\n reset() {\n super.reset();\n this._blocks.forEach(b => b.reset());\n }\n get isComplete() {\n return this.exposeBlock ? this.exposeBlock.isComplete : this._blocks.every(b => b.isComplete);\n }\n get isFilled() {\n return this._blocks.every(b => b.isFilled);\n }\n get isFixed() {\n return this._blocks.every(b => b.isFixed);\n }\n get isOptional() {\n return this._blocks.every(b => b.isOptional);\n }\n doCommit() {\n this._blocks.forEach(b => b.doCommit());\n super.doCommit();\n }\n get unmaskedValue() {\n return this.exposeBlock ? this.exposeBlock.unmaskedValue : this._blocks.reduce((str, b) => str += b.unmaskedValue, '');\n }\n set unmaskedValue(unmaskedValue) {\n if (this.exposeBlock) {\n const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);\n this.exposeBlock.unmaskedValue = unmaskedValue;\n this.appendTail(tail);\n this.doCommit();\n } else super.unmaskedValue = unmaskedValue;\n }\n get value() {\n return this.exposeBlock ? this.exposeBlock.value :\n // TODO return _value when not in change?\n this._blocks.reduce((str, b) => str += b.value, '');\n }\n set value(value) {\n if (this.exposeBlock) {\n const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);\n this.exposeBlock.value = value;\n this.appendTail(tail);\n this.doCommit();\n } else super.value = value;\n }\n get typedValue() {\n return this.exposeBlock ? this.exposeBlock.typedValue : super.typedValue;\n }\n set typedValue(value) {\n if (this.exposeBlock) {\n const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);\n this.exposeBlock.typedValue = value;\n this.appendTail(tail);\n this.doCommit();\n } else super.typedValue = value;\n }\n get displayValue() {\n return this._blocks.reduce((str, b) => str += b.displayValue, '');\n }\n appendTail(tail) {\n return super.appendTail(tail).aggregate(this._appendPlaceholder());\n }\n _appendEager() {\n var _this$_mapPosToBlock;\n const details = new ChangeDetails();\n let startBlockIndex = (_this$_mapPosToBlock = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : _this$_mapPosToBlock.index;\n if (startBlockIndex == null) return details;\n\n // TODO test if it works for nested pattern masks\n if (this._blocks[startBlockIndex].isFilled) ++startBlockIndex;\n for (let bi = startBlockIndex; bi < this._blocks.length; ++bi) {\n const d = this._blocks[bi]._appendEager();\n if (!d.inserted) break;\n details.aggregate(d);\n }\n return details;\n }\n _appendCharRaw(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n const blockIter = this._mapPosToBlock(this.displayValue.length);\n const details = new ChangeDetails();\n if (!blockIter) return details;\n for (let bi = blockIter.index, block; block = this._blocks[bi]; ++bi) {\n var _flags$_beforeTailSta;\n const blockDetails = block._appendChar(ch, {\n ...flags,\n _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) == null || (_flags$_beforeTailSta = _flags$_beforeTailSta._blocks) == null ? void 0 : _flags$_beforeTailSta[bi]\n });\n details.aggregate(blockDetails);\n if (blockDetails.consumed) break; // go next char\n }\n return details;\n }\n extractTail(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n const chunkTail = new ChunksTailDetails();\n if (fromPos === toPos) return chunkTail;\n this._forEachBlocksInRange(fromPos, toPos, (b, bi, bFromPos, bToPos) => {\n const blockChunk = b.extractTail(bFromPos, bToPos);\n blockChunk.stop = this._findStopBefore(bi);\n blockChunk.from = this._blockStartPos(bi);\n if (blockChunk instanceof ChunksTailDetails) blockChunk.blockIndex = bi;\n chunkTail.extend(blockChunk);\n });\n return chunkTail;\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n if (flags === void 0) {\n flags = {};\n }\n if (fromPos === toPos) return '';\n let input = '';\n this._forEachBlocksInRange(fromPos, toPos, (b, _, fromPos, toPos) => {\n input += b.extractInput(fromPos, toPos, flags);\n });\n return input;\n }\n _findStopBefore(blockIndex) {\n let stopBefore;\n for (let si = 0; si < this._stops.length; ++si) {\n const stop = this._stops[si];\n if (stop <= blockIndex) stopBefore = stop;else break;\n }\n return stopBefore;\n }\n\n /** Appends placeholder depending on laziness */\n _appendPlaceholder(toBlockIndex) {\n const details = new ChangeDetails();\n if (this.lazy && toBlockIndex == null) return details;\n const startBlockIter = this._mapPosToBlock(this.displayValue.length);\n if (!startBlockIter) return details;\n const startBlockIndex = startBlockIter.index;\n const endBlockIndex = toBlockIndex != null ? toBlockIndex : this._blocks.length;\n this._blocks.slice(startBlockIndex, endBlockIndex).forEach(b => {\n if (!b.lazy || toBlockIndex != null) {\n var _blocks2;\n details.aggregate(b._appendPlaceholder((_blocks2 = b._blocks) == null ? void 0 : _blocks2.length));\n }\n });\n return details;\n }\n\n /** Finds block in pos */\n _mapPosToBlock(pos) {\n let accVal = '';\n for (let bi = 0; bi < this._blocks.length; ++bi) {\n const block = this._blocks[bi];\n const blockStartPos = accVal.length;\n accVal += block.displayValue;\n if (pos <= accVal.length) {\n return {\n index: bi,\n offset: pos - blockStartPos\n };\n }\n }\n }\n _blockStartPos(blockIndex) {\n return this._blocks.slice(0, blockIndex).reduce((pos, b) => pos += b.displayValue.length, 0);\n }\n _forEachBlocksInRange(fromPos, toPos, fn) {\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n const fromBlockIter = this._mapPosToBlock(fromPos);\n if (fromBlockIter) {\n const toBlockIter = this._mapPosToBlock(toPos);\n // process first block\n const isSameBlock = toBlockIter && fromBlockIter.index === toBlockIter.index;\n const fromBlockStartPos = fromBlockIter.offset;\n const fromBlockEndPos = toBlockIter && isSameBlock ? toBlockIter.offset : this._blocks[fromBlockIter.index].displayValue.length;\n fn(this._blocks[fromBlockIter.index], fromBlockIter.index, fromBlockStartPos, fromBlockEndPos);\n if (toBlockIter && !isSameBlock) {\n // process intermediate blocks\n for (let bi = fromBlockIter.index + 1; bi < toBlockIter.index; ++bi) {\n fn(this._blocks[bi], bi, 0, this._blocks[bi].displayValue.length);\n }\n\n // process last block\n fn(this._blocks[toBlockIter.index], toBlockIter.index, 0, toBlockIter.offset);\n }\n }\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n const removeDetails = super.remove(fromPos, toPos);\n this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => {\n removeDetails.aggregate(b.remove(bFromPos, bToPos));\n });\n return removeDetails;\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n if (!this._blocks.length) return 0;\n const cursor = new PatternCursor(this, cursorPos);\n if (direction === DIRECTION.NONE) {\n // -------------------------------------------------\n // NONE should only go out from fixed to the right!\n // -------------------------------------------------\n if (cursor.pushRightBeforeInput()) return cursor.pos;\n cursor.popState();\n if (cursor.pushLeftBeforeInput()) return cursor.pos;\n return this.displayValue.length;\n }\n\n // FORCE is only about a|* otherwise is 0\n if (direction === DIRECTION.LEFT || direction === DIRECTION.FORCE_LEFT) {\n // try to break fast when *|a\n if (direction === DIRECTION.LEFT) {\n cursor.pushRightBeforeFilled();\n if (cursor.ok && cursor.pos === cursorPos) return cursorPos;\n cursor.popState();\n }\n\n // forward flow\n cursor.pushLeftBeforeInput();\n cursor.pushLeftBeforeRequired();\n cursor.pushLeftBeforeFilled();\n\n // backward flow\n if (direction === DIRECTION.LEFT) {\n cursor.pushRightBeforeInput();\n cursor.pushRightBeforeRequired();\n if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;\n cursor.popState();\n if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;\n cursor.popState();\n }\n if (cursor.ok) return cursor.pos;\n if (direction === DIRECTION.FORCE_LEFT) return 0;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n return 0;\n }\n if (direction === DIRECTION.RIGHT || direction === DIRECTION.FORCE_RIGHT) {\n // forward flow\n cursor.pushRightBeforeInput();\n cursor.pushRightBeforeRequired();\n if (cursor.pushRightBeforeFilled()) return cursor.pos;\n if (direction === DIRECTION.FORCE_RIGHT) return this.displayValue.length;\n\n // backward flow\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n return this.nearestInputPos(cursorPos, DIRECTION.LEFT);\n }\n return cursorPos;\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n let total = 0;\n this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => {\n total += b.totalInputPositions(bFromPos, bToPos);\n });\n return total;\n }\n\n /** Get block by name */\n maskedBlock(name) {\n return this.maskedBlocks(name)[0];\n }\n\n /** Get all blocks by name */\n maskedBlocks(name) {\n const indices = this._maskedBlocks[name];\n if (!indices) return [];\n return indices.map(gi => this._blocks[gi]);\n }\n pad(flags) {\n const details = new ChangeDetails();\n this._forEachBlocksInRange(0, this.displayValue.length, b => details.aggregate(b.pad(flags)));\n return details;\n }\n}\nMaskedPattern.DEFAULTS = {\n ...Masked.DEFAULTS,\n lazy: true,\n placeholderChar: '_'\n};\nMaskedPattern.STOP_CHAR = '`';\nMaskedPattern.ESCAPE_CHAR = '\\\\';\nMaskedPattern.InputDefinition = PatternInputDefinition;\nMaskedPattern.FixedDefinition = PatternFixedDefinition;\nIMask.MaskedPattern = MaskedPattern;\n\nexport { MaskedPattern as default };\n","@import '../../themes/capsule.globals';\n\n:host {\n --container-box-shadow: none;\n --container-box-shadow-color: none;\n --container-border-color: var(--cpsl-color-input-border-active);\n --container-border-error-color: var(--cpsl-color-input-border-error);\n --container-background-color: var(--cpsl-color-input-surface-default);\n --container-background-color-disabled: var(--cpsl-color-input-surface-disabled);\n --container-border-width: 1px;\n --container-border-radius: var(--cpsl-border-radius-input);\n --container-padding-top: 0px;\n --container-padding-bottom: 0px;\n --container-padding-end: 12px;\n --container-padding-start: 12px;\n --container-height: 48px;\n --container-gap: 8px;\n\n --input-background-color: var(--cpsl-color-input-surface-default);\n --input-background-color-disabled: var(--cpsl-color-input-surface-disabled);\n --input-color: var(--cpsl-color-text-primary);\n --input-placeholder-color: var(--cpsl-color-text-secondary);\n --input-font-size: var(--cpsl-font-size-body-m);\n --input-font-weight: 400;\n\n --optional-label-color: var(--cpsl-color-text-secondary);\n --label-color: var(--cpsl-color-text-primary);\n --label-font-size: var(--cpsl-font-size-body-s);\n --label-margin-bottom: 0px;\n\n --helper-text-color: var(--cpsl-color-text-secondary);\n --helper-text-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-color: var(--cpsl-color-text-secondary);\n --helper-text-icon-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-size: 16px;\n --helper-text-font-size: var(--cpsl-font-size-body-xs);\n --helper-text-margin-top: 0px;\n\n --button-padding: 8px;\n\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n font-family: $font-family-base;\n}\n\n:host(.contrast-text) {\n --input-color: var(--cpsl-color-contrast);\n}\n\n:host(:not(.has-value)) {\n --container-border-color: var(--cpsl-color-input-border-placeholder);\n --input-color: var(--cpsl-color-text-secondary);\n}\n\n:host(.disabled) {\n --container-background-color: var(--container-background-color-disabled);\n --input-background-color: var(--input-background-color-disabled);\n --input-color: var(--cpsl-color-text-disabled);\n --container-border-color: transparent;\n}\n\n:host(.focused) {\n --container-box-shadow: 0px 0px 0px 2px var(--container-box-shadow-color);\n --container-border-color: var(--cpsl-color-input-border-active);\n --container-background-color: var(--cpsl-color-input-surface-default);\n}\n\n.input-container {\n @include padding(var(--container-padding-top), var(--container-padding-end), var(--container-padding-bottom), var(--container-padding-start));\n\n display: flex;\n align-items: center;\n box-sizing: border-box;\n height: var(--container-height);\n gap: var(--container-gap);\n\n border-style: solid;\n border-width: var(--container-border-width);\n border-color: var(--container-border-color);\n border-radius: var(--container-border-radius);\n background: var(--container-background-color);\n\n box-shadow: var(--container-box-shadow);\n}\n\n.error-container {\n border-color: var(--container-border-error-color);\n}\n\n.native-input {\n flex: 1;\n min-width: 0;\n border: none;\n height: 100%;\n box-sizing: border-box;\n\n font-size: var(--input-font-size);\n font-weight: var(--input-font-weight);\n color: var(--input-color);\n background: var(--input-background-color);\n\n &:focus,\n &:focus-visible {\n outline: none;\n }\n\n &::placeholder {\n color: var(--input-placeholder-color);\n opacity: 1; /* Firefox */\n }\n\n &::-moz-selection {\n /* Code for Firefox */\n color: var(--cpsl-color-text-inverted);\n background: var(--cpsl-color-background-64);\n }\n\n &::selection {\n color: var(--cpsl-color-text-inverted);\n background: var(--cpsl-color-background-64);\n }\n\n font-family: $font-family-base;\n}\n\n.label {\n display: inline-block;\n color: var(--label-color);\n font-size: var(--label-font-size);\n font-weight: 500;\n\n margin-bottom: var(--label-margin-bottom);\n}\n\n.optional-label {\n display: inline-block;\n color: var(--optional-label-color);\n // TODO: this will use a typography size once typography changes\n font-size: var(--label-font-size);\n font-weight: 500;\n}\n\n.helper-text-container {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--helper-text-color);\n font-size: var(--helper-text-font-size);\n font-weight: 500;\n\n margin-top: var(--helper-text-margin-top);\n\n cpsl-icon {\n --height: var(--helper-text-icon-size);\n --width: var(--helper-text-icon-size);\n --icon-color: var(--helper-text-icon-color);\n }\n}\n\n.error-text {\n color: var(--helper-text-error-color);\n\n cpsl-icon {\n --icon-color: var(--helper-text-icon-error-color);\n }\n}\n\n:host {\n ::slotted([slot='start']) {\n flex: 0 0 auto;\n }\n ::slotted([slot='end']) {\n flex: 0 0 auto;\n }\n ::slotted(cpsl-icon) {\n --icon-color: var(--input-color);\n }\n ::slotted(cpsl-button) {\n width: calc(var(--container-height) - var(--button-padding) * 2);\n height: calc(var(--container-height) - var(--button-padding) * 2);\n --button-border-radius: calc(var(--container-border-radius) - 4px);\n --button-padding-top: 4px;\n --button-padding-start: 4px;\n --button-padding-end: 4px;\n --button-padding-bottom: 4px;\n }\n slot[name='end']::slotted(cpsl-button) {\n margin-right: calc(calc(var(--container-padding-end) - var(--button-padding)) * -1);\n }\n slot[name='start']::slotted(cpsl-button) {\n margin-left: calc(calc(var(--container-padding-end) - var(--button-padding)) * -1);\n }\n}\n","import { Component, Host, Prop, h, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\nimport { AutocompleteTypes, IconType, TextFieldTypes } from '../../interface';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\nimport IMask from 'imask/esm/imask';\nimport InputMask from 'imask/esm/controls/input';\nimport 'imask/esm/masked/pattern';\n\n@Component({\n tag: 'cpsl-input',\n styleUrl: 'cpsl-input.scss',\n shadow: true,\n})\nexport class CpslInput {\n private nativeInput?: HTMLInputElement;\n @Element() el!: HTMLCpslInputElement;\n\n private inputId = `cpsl-input-${inputIds++}`;\n /**\n * The value of the input when the input is focused.\n */\n private focusedValue?: string | number | null;\n\n @State() hasFocus = false;\n @State() maskedInput?: InputMask;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n * Available options: `\"off\"`, `\"none\"`, `\"on\"`, `\"sentences\"`, `\"words\"`, `\"characters\"`.\n */\n\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * Whether to disable auto disabling of the slotted components.\n */\n @Prop() noAutoDisable: boolean;\n\n /**\n * Sets the [`autofocus` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) on the native input element.\n *\n * This may not be sufficient for the element to be focused on page load.\n */\n\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * If `true`, the input primary color will use the contrast value, not the primary text value.\n */\n @Prop() contrastText = false;\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /**\n * Error text to show below the input. If this is provided the input will enter an error state.\n */\n @Prop() errorText?: string;\n\n /**\n * Mask string to apply to the input.\n */\n @Prop() mask?: string;\n\n /**\n * Helper text to show below the input. If `\"errorText\"` is provided that will take precedence.\n */\n @Prop() helperText?: string;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * The label for the input.\n */\n @Prop() label?: string;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string | number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string | number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise it is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support the `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n * This property applies only when the `type` property is set to `\"email\"`,\n * `\"number\"`, `\"password\"`, `\"search\"`, `\"tel\"`, `\"text\"`, or `\"url\"`, otherwise it is ignored.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the label will display an \"optional\" tag.\n */\n @Prop() showOptionalLabel = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n\n @Prop() spellcheck = false;\n\n /**\n * The external source of the icon at the start of the input. If both `startIcon` and `startIconSrc` are provided, `startIcon` will be used.\n */\n @Prop() startIconSrc?: string;\n\n /**\n * The name of the icon at the start of the input. If both `startIcon` and `startIconSrc` are provided, `startIcon` will be used.\n */\n @Prop() startIcon?: IconType;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The type of control to display. The default type is `text`.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the controlled input.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The `cpslInput` event is fired each time the user modifies the input's value.\n * Unlike the `cpslChange` event, the `cpslInput` event is fired for each alteration\n * to the input's value. This typically happens for each keystroke as the user types.\n *\n * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface\n * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\n * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\n * the input is cleared on edit, the type is `null`.\n */\n @Event() cpslInput!: EventEmitter<InputInputEventDetail>;\n\n /**\n * The `cpslChange` event is fired when the user modifies the input's value.\n * Unlike the `cpslInput` event, the `cpslChange` event is only fired when changes\n * are committed, not as the user types.\n *\n * Depending on the way the users interacts with the element, the `cpslChange`\n * event fires at a different moment:\n * - When the element loses focus after its value has changed: for elements\n * where the user's interaction is typing.\n */\n @Event() cpslChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() cpslBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() cpslFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when something has been paste into the input.\n */\n @Event() cpslPaste!: EventEmitter<ClipboardEvent>;\n\n @Watch('disabled')\n handleDisable() {\n if (this.disabled) {\n this.disableSlots();\n } else {\n this.enableSlots();\n }\n }\n\n @Watch('mask')\n handleSetupMask() {\n if (this.nativeInput) {\n if (this.mask) {\n if (this.maskedInput) {\n this.maskedInput.updateOptions({\n mask: this.mask as any,\n });\n } else {\n this.maskedInput = IMask(this.nativeInput, {\n mask: this.mask,\n definitions: {\n // <any single char>: <same type as mask (RegExp, Function, etc.)>\n // defaults are '0', 'a', '*'\n '#': /[\\d]/,\n },\n });\n }\n } else {\n this.maskedInput?.destroy();\n this.nativeInput.value = this.value ?? '';\n this.maskedInput = undefined;\n }\n }\n }\n\n @Watch('value')\n handleValueChange() {\n if (!this.value) {\n this.nativeInput.value = this.value ?? '';\n }\n }\n\n componentDidLoad() {\n this.initButtons();\n if (this.value) {\n this.enableSlots();\n } else {\n this.disableSlots();\n }\n\n this.handleSetupMask();\n }\n\n private disableSlots() {\n if (!this.noAutoDisable) {\n this.endEl?.setAttribute('disabled', 'true');\n this.startEl?.setAttribute('disabled', 'true');\n }\n }\n\n private enableSlots() {\n this.endEl?.setAttribute('disabled', 'false');\n this.startEl?.setAttribute('disabled', 'false');\n }\n\n private initButtons() {\n if (this.endEl?.tagName === 'CPSL-BUTTON') {\n this.endEl.setAttribute('full-width', 'true');\n this.endEl.addEventListener('mousedown', e => {\n e.preventDefault();\n });\n }\n if (this.startEl?.tagName === 'CPSL-BUTTON') {\n this.startEl.setAttribute('full-width', 'true');\n this.startEl.addEventListener('mousedown', e => {\n e.preventDefault();\n });\n }\n }\n\n /**\n * Emits a `cpslInput` event.\n */\n private emitInputChange(event?: Event) {\n this.cpslInput.emit({ value: this.value || '', event });\n }\n\n /**\n * Emits a `cpslChange` event.\n *\n * This API should be called for user committed changes.\n * This API should not be used for external value changes.\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n // Emitting a value change should update the internal state for tracking the focused value\n this.focusedValue = newValue;\n this.cpslChange.emit({ value: newValue, event });\n }\n\n private onInput = (ev: InputEvent) => {\n const input = ev.target as HTMLInputElement | null;\n\n this.maskedInput?._onInput(ev);\n\n if (Boolean(input)) {\n this.value = this.maskedInput?.unmaskedValue ?? (input.value || '');\n input.value === '' ? this.disableSlots() : this.enableSlots();\n }\n\n this.emitInputChange(ev);\n };\n\n private onChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `cpslChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.cpslBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.cpslFocus.emit(ev);\n };\n\n private onPaste = (ev: ClipboardEvent) => {\n ev.stopPropagation();\n ev.preventDefault();\n\n const input = ev.target as HTMLInputElement;\n const pasteData = ev.clipboardData?.getData('text') || '';\n\n // Manually set the value & cursor position\n const initialSelectionStart = input.selectionStart;\n const newVal = `${input.value.slice(0, input.selectionStart)}${pasteData}${input.value.slice(input.selectionEnd, input.value.length)}`;\n input.value = newVal;\n\n // this.value = newVal;\n input.selectionEnd = initialSelectionStart + pasteData.length;\n\n this.maskedInput?._onInput({ ...(ev as any), target: input });\n this.value = this.maskedInput?.unmaskedValue ?? (input.value || '');\n\n this.value === '' ? this.disableSlots() : this.enableSlots();\n\n // Emit the cpslPaste event\n this.cpslPaste.emit(ev);\n\n // Emit the cpslChange event since the value was modified by paste\n this.emitInputChange(ev);\n };\n\n private focusInput = () => {\n this.nativeInput.focus();\n };\n\n private get startEl() {\n return this.el.querySelector('[slot=\"start\"]');\n }\n\n private get endEl() {\n return this.el.querySelector('[slot=\"end\"]');\n }\n\n render() {\n return (\n <Host class={{ 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.focusedValue) || Boolean(this.value), 'contrast-text': this.contrastText }}>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n {this.required ? '*' : ' '}\n {!this.required && this.showOptionalLabel ? <span class=\"optional-label\">(optional)</span> : ''}\n </label>\n )}\n <div class={{ 'input-container': true, 'error-container': Boolean(this.errorText) }}>\n <slot name=\"start\"></slot>\n <input\n class=\"native-input\"\n part=\"native-input\"\n ref={input => (this.nativeInput = input)}\n id={this.inputId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n type={this.type}\n defaultValue={this.value ?? ''}\n onInput={this.onInput}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.focusInput}\n onPaste={this.onPaste}\n />\n <slot name=\"end\"></slot>\n </div>\n {(this.errorText || this.helperText) && (\n <div class={{ 'helper-text-container': true, 'error-text': Boolean(this.errorText) }}>\n <span>{this.errorText ?? this.helperText}</span>\n </div>\n )}\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n",":host {\n display: flex;\n flex-direction: column;\n\n gap: 8px;\n padding: 0px 16px;\n box-sizing: border-box;\n width: 100%;\n}\n","import { Component, Host, Element, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-nav-button-group',\n styleUrl: 'cpsl-nav-button-group.scss',\n shadow: true,\n})\nexport class CpslNavButtonGroup {\n @Element() el!: HTMLCpslNavButtonGroupElement;\n\n componentWillRender() {\n if (this.otherSlots?.length) {\n console.error('cpsl-button is the only valid child of cpsl-nav-button-group');\n this.otherSlots.forEach(item => item.remove());\n }\n }\n\n private get otherSlots() {\n return this.el.querySelectorAll('&> *:not(cpsl-nav-button)');\n }\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n","@use 'sass:map';\n@import '../../themes/capsule.globals';\n\n:host {\n position: fixed;\n width: 100%;\n height: 100%;\n inset: 0px;\n\n z-index: map.get($z-indices, 'overlay');\n\n opacity: 0%;\n display: none;\n\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.7) 100%);\n}\n\n:host(.over-modal) {\n z-index: map.get($z-indices, 'modal');\n}\n","import { Component, Host, Prop, h, Element, Watch } from '@stencil/core';\nimport gsap from 'gsap';\n\n@Component({\n tag: 'cpsl-overlay',\n styleUrl: 'cpsl-overlay.scss',\n shadow: true,\n})\nexport class CpslOverlay {\n @Element() el!: HTMLCpslOverlayElement;\n\n /**\n * Duration in seconds of the fade out animation.\n * Default is .5.\n */\n @Prop() enterTransitionDuration?: number = 0.5;\n\n /**\n * Duration in seconds of the fade out animation.\n * Default is .5.\n */\n @Prop() exitTransitionDuration?: number = 0.5;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n @Watch('open')\n toggleHeight() {\n this.open\n ? gsap.timeline({ defaults: { duration: this.enterTransitionDuration } }).to(this.el, { display: 'block', opacity: 1 })\n : gsap.timeline({ defaults: { duration: this.exitTransitionDuration } }).to(this.el, { display: 'none', opacity: 0 });\n\n if (this.open) {\n document.documentElement.style.overflow = 'hidden';\n } else {\n // Setting a timeout here to prevent modal from shifting when the scroll bar appears\n setTimeout(() => {\n document.documentElement.style.overflow = 'auto';\n }, this.exitTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n if (this.open) {\n gsap.timeline({ defaults: { duration: this.enterTransitionDuration } }).to(this.el, { display: 'block', opacity: 1 });\n document.documentElement.style.overflow = 'hidden';\n }\n }\n\n render() {\n return (\n <Host style={this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}}>\n <slot></slot>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n display: block;\n}\n\n.icon {\n --height: 20px;\n --width: 20px;\n}\n\n.start-icon {\n transform: rotate(180deg);\n}\n\n.arrow-button {\n --button-secondary-icon-color: var(--cpsl-color-text-tertiary);\n}\n","import { Component, Host, Prop, State, Event, h, EventEmitter, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-pagination',\n styleUrl: 'cpsl-pagination.scss',\n shadow: true,\n})\nexport class CpslPagination {\n @State() currentPage = 0;\n\n /**\n * The initial page to select.\n * Default is 0.\n */\n @Prop() initialPage?: number;\n\n /**\n * The total number of pages.\n */\n @Prop() totalPages: number;\n\n /**\n * The number of pages visible to select.\n * Default is 5.\n * Min is 5.\n */\n\n @Prop({ mutable: true }) visiblePages?: number = 5;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslPaginationChanged!: EventEmitter<number>;\n\n @Watch('currentPage')\n watchChange() {\n this.cpslPaginationChanged.emit(this.currentPage);\n }\n\n componentWillLoad() {\n this.currentPage = this.initialPage ?? 0;\n if (this.visiblePages < 5) {\n this.visiblePages = 5;\n }\n }\n\n private handlePrevClick = () => {\n if (this.currentPage > 0) {\n this.currentPage--;\n }\n };\n\n private handleNextClick = () => {\n if (this.currentPage < this.totalPages - 1) {\n this.currentPage++;\n }\n };\n\n private handlePageClick = (value: number) => () => {\n if (value >= 0 && value <= this.totalPages - 1) {\n this.currentPage = value;\n }\n };\n\n render() {\n const filteredPages: number[] = this.totalPages <= this.visiblePages ? [...Array(this.totalPages).keys()] : [];\n\n if (this.totalPages > this.visiblePages) {\n filteredPages.push(0);\n\n const isFirstSelected = this.currentPage === 0;\n const isLastSelected = this.currentPage === this.totalPages - 1;\n const isFirstOrLastSelected = isFirstSelected || isLastSelected;\n\n let remainingVisible = this.visiblePages - (isFirstOrLastSelected ? 2 : 3);\n const halfRemaining = Math.round(remainingVisible / 2);\n const numberBefore = Math.max(this.currentPage - 1, 0);\n const numberAfter = Math.max(this.totalPages - 2 - this.currentPage, 0);\n let beforeHalf = halfRemaining;\n let afterHalf = remainingVisible - halfRemaining;\n\n if (numberBefore >= beforeHalf) {\n if (numberAfter < afterHalf) {\n beforeHalf += afterHalf - numberAfter;\n afterHalf = numberAfter;\n }\n } else {\n afterHalf += beforeHalf - numberBefore;\n beforeHalf = numberBefore;\n }\n\n while (beforeHalf > 0) {\n filteredPages.push(this.currentPage - beforeHalf);\n beforeHalf--;\n }\n\n if (!isFirstSelected) {\n filteredPages.push(this.currentPage);\n }\n\n const pagesAfter: number[] = [];\n while (afterHalf > 0) {\n pagesAfter.push(this.currentPage + afterHalf);\n afterHalf--;\n }\n\n filteredPages.push(...pagesAfter.reverse());\n\n if (!isLastSelected) {\n filteredPages.push(this.totalPages - 1);\n }\n }\n\n return (\n <Host>\n <cpsl-button-group selectedId={`${this.currentPage}`}>\n <cpsl-button class=\"arrow-button\" onClick={this.handlePrevClick}>\n <cpsl-icon class={{ 'icon': true, 'start-icon': true }} icon=\"arrowNarrow\" />\n </cpsl-button>\n {filteredPages.map(page => (\n <cpsl-button key={page} variant=\"secondary\" fullWidth id={`${page}`} onClick={this.handlePageClick(page)}>\n <cpsl-text variant=\"bodyS\">{page + 1}</cpsl-text>\n </cpsl-button>\n ))}\n <cpsl-button class=\"arrow-button\" onClick={this.handleNextClick}>\n <cpsl-icon class=\"icon\" icon=\"arrowNarrow\" />\n </cpsl-button>\n </cpsl-button-group>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --pill-text-color: var(--cpsl-pill-text);\n --pill-text-size: #{dynamic-font-clamp(1, 10px, 1.5)};\n --pill-text-line-height: 100%;\n\n --pill-container-height: 18px;\n --pill-container-background-color: var(--cpsl-color-pill-container-background);\n --pill-container-border-color: var(--cpsl-color-pill-container-border);\n --pill-container-padding-start: 8px;\n --pill-container-padding-end: 8px;\n --pill-container-border-radius: var(--cpsl-border-radius-pill);\n\n font-family: $font-family-base;\n display: inline-block;\n}\n\n.pill-container {\n @include padding(var(--pill-container-padding-top), var(--pill-container-padding-end), var(--pill-container-padding-bottom), var(--pill-container-padding-start));\n\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n\n height: var(--pill-container-height);\n\n background: var(--pill-container-background-color);\n border: 1px solid;\n border-color: var(--pill-container-border-color);\n border-radius: var(--pill-container-border-radius);\n\n color: var(--pill-text-color);\n font-size: var(--pill-text-size);\n line-height: var(--pill-text-line-height);\n\n span {\n display: inline-block;\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-pill',\n styleUrl: 'cpsl-pill.scss',\n shadow: true,\n})\nexport class CpslPill {\n /**\n * Text of the pill.\n */\n @Prop() text: string;\n\n render() {\n return (\n <Host>\n <div class=\"pill-container\">\n <span>{this.text}</span>\n </div>\n </Host>\n );\n }\n}\n","@use 'sass:map';\n@import '../../themes/capsule.globals';\n\n:host {\n position: fixed;\n display: block;\n\n z-index: -1;\n overflow: auto;\n}\n\n:host(.open) {\n z-index: map.get($z-indices, 'popover');\n}\n\n.container {\n visibility: hidden;\n height: 0px;\n}\n\n.open {\n visibility: visible;\n height: auto;\n z-index: map.get($z-indices, 'popover');\n}\n\n:host(.transform-h-left) {\n transform: translateX(0);\n}\n\n:host(.transform-h-center) {\n transform: translateX(-50%);\n}\n\n:host(.transform-h-right) {\n transform: translateX(-100%);\n}\n\n:host(.transform-v-top) {\n transform: translateY(0);\n}\n\n:host(.transform-v-center) {\n transform: translateY(-50%);\n}\n\n:host(.transform-v-bottom) {\n transform: translateY(-100%);\n}\n","import { Component, Host, Prop, State, Watch, Element, h, Method, Event, EventEmitter } from '@stencil/core';\nimport { InteractionCallback } from '../../interface';\n\n@Component({\n tag: 'cpsl-popover',\n styleUrl: 'cpsl-popover.scss',\n shadow: true,\n})\nexport class CpslPopover {\n private triggerEl?: HTMLElement | null;\n private destroyTriggerInteraction?: () => void;\n\n @Element() el!: HTMLCpslPopoverElement;\n\n @State() open = false;\n private triggerClicked = false;\n @State() positionX?: number;\n @State() positionY?: number;\n\n /**\n * ID for the element that the popover anchors to.\n */\n @Prop() anchorEl?: HTMLElement;\n\n /**\n * Vertical anchor origin.\n * Options are: `\"left\"`, `\"center\"`, `\"right\"`.\n * Default is: `\"left\"`.\n */\n @Prop() anchorOriginHorizontal?: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Vertical anchor origin.\n * Options are: `\"top\"`, `\"center\"`, `\"bottom\"`.\n * Default is: `\"bottom\"`.\n */\n @Prop() anchorOriginVertical?: 'top' | 'center' | 'bottom' = 'bottom';\n\n /**\n * If `true` the container will use the width of the content, else it will be set to the width of the trigger.\n * Default is `true`\n */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() autoWidth?: boolean = true;\n\n /**\n * Whether or not to disable to popover.\n */\n @Prop() disabled: boolean;\n\n /**\n * Used internally to prevent select from blurring unintentionally.\n */\n @Prop() preventBlur: boolean;\n\n /**\n * Vertical transformation origin.\n * Options are: `\"left\"`, `\"center\"`, `\"right\"`.\n * Default is: `\"left\"`.\n */\n @Prop() transformOriginHorizontal?: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Vertical transformation origin.\n * Options are: `\"top\"`, `\"center\"`, `\"bottom\"`.\n * Default is: `\"bottom\"`.\n */\n @Prop() transformOriginVertical?: 'top' | 'center' | 'bottom' = 'top';\n\n /**\n * Which trigger causes the popover to open.\n * Options are: `\"click\"`, `\"hover\"`.\n * Default is: `\"click\"`.\n */\n @Prop() triggerAction: 'click' | 'hover' = 'click';\n\n /**\n * ID for the element that triggers the popover to open.\n */\n @Prop() trigger: string;\n\n /**\n * Padding from edge of window for the popover container.\n */\n @Prop() windowPadding?: number = 16;\n\n /**\n * Emitted when the popover opens.\n */\n @Event() cpslOpen!: EventEmitter<void>;\n\n /**\n * Emitted when the popover closes.\n */\n @Event() cpslClose!: EventEmitter<void>;\n\n /**\n * Call to close the popover manually.\n */\n @Method()\n async closePopover() {\n this.close();\n }\n\n @Watch('trigger')\n @Watch('triggerAction')\n @Watch('preventBlur')\n onTriggerChange() {\n this.configureTriggerInteraction();\n }\n\n @Watch('anchorOriginHorizontal')\n @Watch('anchorOriginVertical')\n onAnchorChange() {\n this.setPosition();\n }\n\n @Watch('open')\n onOpenChange() {\n if (this.open) {\n window.addEventListener('click', this.handleClickOutside);\n window.addEventListener('scroll', () => this.setPosition(), true);\n window.addEventListener('resize', () => this.setPosition(), true);\n } else {\n window.removeEventListener('click', this.handleClickOutside);\n window.removeEventListener('scroll', () => this.setPosition(), true);\n window.removeEventListener('resize', () => this.setPosition(), true);\n }\n }\n\n componentDidLoad() {\n this.configureTriggerInteraction();\n }\n\n private configureTriggerInteraction = () => {\n const { trigger, triggerAction, destroyTriggerInteraction } = this;\n\n if (destroyTriggerInteraction) {\n destroyTriggerInteraction();\n }\n\n if (trigger === undefined) {\n return;\n }\n\n this.triggerEl = document.getElementById(trigger);\n if (!this.triggerEl) {\n console.error(`A trigger element with the ID \"${trigger}\" was not found in the DOM.`, this.el);\n return;\n }\n\n let triggerCallbacks: InteractionCallback[] = [];\n /**\n * Based upon the kind of trigger interaction\n * the user wants, we setup the correct event\n * listeners.\n */\n switch (triggerAction) {\n case 'hover':\n triggerCallbacks = [\n {\n eventName: 'mouseenter',\n callback: async () => {\n this.present();\n },\n },\n {\n eventName: 'mouseleave',\n callback: () => {\n if (!this.containerEl.matches(':hover')) {\n this.close();\n } else {\n this.containerEl.addEventListener('mouseleave', () => {\n this.close();\n });\n }\n },\n },\n {\n eventName: 'click',\n callback: (ev: Event) => ev.stopPropagation(),\n },\n ];\n\n break;\n case 'click':\n default:\n triggerCallbacks = [\n {\n eventName: 'mousedown',\n callback: e => {\n if (this.preventBlur) {\n e.preventDefault();\n }\n this.present();\n },\n },\n ];\n break;\n }\n\n triggerCallbacks.forEach(({ eventName, callback }) => this.triggerEl.addEventListener(eventName, callback));\n\n this.destroyTriggerInteraction = () => {\n triggerCallbacks.forEach(({ eventName, callback }) => this.triggerEl.removeEventListener(eventName, callback));\n };\n };\n\n private setPosition = () => {\n const anchorEl = this.anchorEl ?? this.triggerEl;\n if (anchorEl) {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const elWidth = this.el.clientWidth;\n const elHeight = this.el.clientHeight;\n const { top, left, height, width } = anchorEl.getBoundingClientRect();\n\n switch (this.anchorOriginHorizontal) {\n case 'left': {\n this.positionX = left;\n break;\n }\n case 'center': {\n this.positionX = left + width / 2;\n break;\n }\n case 'right': {\n this.positionX = left + width;\n break;\n }\n }\n\n switch (this.anchorOriginVertical) {\n case 'top': {\n this.positionY = top;\n break;\n }\n case 'center': {\n this.positionY = top + height / 2;\n break;\n }\n case 'bottom': {\n this.positionY = top + height;\n break;\n }\n }\n\n if (this.positionY < this.windowPadding) {\n this.positionY = this.windowPadding;\n }\n if (this.positionY + elHeight > windowHeight - 16) {\n this.positionY = windowHeight - this.windowPadding - elHeight;\n }\n\n if (this.positionX < this.windowPadding) {\n this.positionX = this.windowPadding;\n }\n if (this.positionX + elWidth > windowWidth - 16) {\n this.positionX = windowWidth - this.windowPadding - elWidth;\n }\n }\n };\n\n private handleClickOutside = (event: MouseEvent) => {\n if (!this.triggerClicked && this.triggerEl.contains(event.target as Node)) {\n this.triggerClicked = true;\n return;\n }\n if (this.open && !this.el.contains(event.target as Node)) {\n event.preventDefault();\n this.close();\n }\n };\n\n private present = () => {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.cpslOpen.emit();\n this.setPosition();\n }\n };\n\n private close = () => {\n this.open = false;\n this.triggerClicked = false;\n this.cpslClose.emit();\n };\n\n get containerEl() {\n return this.el?.shadowRoot?.getElementById('container');\n }\n\n render() {\n return (\n <Host\n class={{\n 'open': this.open,\n 'transform-h-left': this.transformOriginHorizontal === 'left',\n 'transform-h-center': this.transformOriginHorizontal === 'center',\n 'transform-h-right': this.transformOriginHorizontal === 'right',\n 'transform-v-top': this.transformOriginVertical === 'top',\n 'transform-v-center': this.transformOriginVertical === 'center',\n 'transform-v-bottom': this.transformOriginVertical === 'bottom',\n }}\n style={{ top: `${this.positionY}px`, left: `${this.positionX}px`, width: !this.open ? '0px' : this.autoWidth ? 'auto' : `${this.triggerEl?.clientWidth}px` }}\n >\n <div id=\"container\" class={{ container: true, open: this.open }}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --step-height: 3px;\n --step-active-color: var(--cpsl-color-progressIndicator-active);\n --step-next-color: var(--cpsl-color-progressIndicator-next);\n --step-previous-color: var(--cpsl-color-progressIndicator-previous);\n\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n}\n\n.step {\n background: var(--step-next-color);\n\n border-radius: var(--step-border-radius, calc(var(--step-height) * 2));\n height: var(--step-height);\n flex: 1;\n transition: all 0.5s;\n}\n\n.previous {\n background: var(--step-previous-color);\n}\n\n.active {\n background: var(--step-active-color);\n flex: 2;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\nimport { Step } from './progress-indicator-interface';\n\n@Component({\n tag: 'cpsl-progress-indicator',\n styleUrl: 'cpsl-progress-indicator.scss',\n shadow: true,\n})\nexport class CpslProgressIndicator {\n /**\n * Total number of steps.\n */\n @Prop() totalSteps: number;\n\n /**\n * Current zero based step.\n */\n @Prop() step: number;\n\n render() {\n const steps: Step[] = new Array(this.totalSteps).fill(0).map((_, i) => {\n let resp: Step = { active: false, previous: false };\n if (i === this.step) {\n resp.active = true;\n } else if (i < this.step) {\n resp.previous = true;\n }\n return resp;\n });\n\n return (\n <Host>\n {steps.map(step => (\n <div class={{ step: true, active: step.active, previous: step.previous }} />\n ))}\n </Host>\n );\n }\n}\n","// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n","let toSJISFunction\nconst CODEWORDS_COUNT = [\n 0, // Not used\n 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,\n 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,\n 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,\n 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706\n]\n\n/**\n * Returns the QR Code size for the specified version\n *\n * @param {Number} version QR Code version\n * @return {Number} size of QR code\n */\nexports.getSymbolSize = function getSymbolSize (version) {\n if (!version) throw new Error('\"version\" cannot be null or undefined')\n if (version < 1 || version > 40) throw new Error('\"version\" should be in range from 1 to 40')\n return version * 4 + 17\n}\n\n/**\n * Returns the total number of codewords used to store data and EC information.\n *\n * @param {Number} version QR Code version\n * @return {Number} Data length in bits\n */\nexports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {\n return CODEWORDS_COUNT[version]\n}\n\n/**\n * Encode data with Bose-Chaudhuri-Hocquenghem\n *\n * @param {Number} data Value to encode\n * @return {Number} Encoded value\n */\nexports.getBCHDigit = function (data) {\n let digit = 0\n\n while (data !== 0) {\n digit++\n data >>>= 1\n }\n\n return digit\n}\n\nexports.setToSJISFunction = function setToSJISFunction (f) {\n if (typeof f !== 'function') {\n throw new Error('\"toSJISFunc\" is not a valid function.')\n }\n\n toSJISFunction = f\n}\n\nexports.isKanjiModeEnabled = function () {\n return typeof toSJISFunction !== 'undefined'\n}\n\nexports.toSJIS = function toSJIS (kanji) {\n return toSJISFunction(kanji)\n}\n","exports.L = { bit: 1 }\nexports.M = { bit: 0 }\nexports.Q = { bit: 3 }\nexports.H = { bit: 2 }\n\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'l':\n case 'low':\n return exports.L\n\n case 'm':\n case 'medium':\n return exports.M\n\n case 'q':\n case 'quartile':\n return exports.Q\n\n case 'h':\n case 'high':\n return exports.H\n\n default:\n throw new Error('Unknown EC Level: ' + string)\n }\n}\n\nexports.isValid = function isValid (level) {\n return level && typeof level.bit !== 'undefined' &&\n level.bit >= 0 && level.bit < 4\n}\n\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","function BitBuffer () {\n this.buffer = []\n this.length = 0\n}\n\nBitBuffer.prototype = {\n\n get: function (index) {\n const bufIndex = Math.floor(index / 8)\n return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1\n },\n\n put: function (num, length) {\n for (let i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) === 1)\n }\n },\n\n getLengthInBits: function () {\n return this.length\n },\n\n putBit: function (bit) {\n const bufIndex = Math.floor(this.length / 8)\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0)\n }\n\n if (bit) {\n this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))\n }\n\n this.length++\n }\n}\n\nmodule.exports = BitBuffer\n","/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n","/**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\nconst getSymbolSize = require('./utils').getSymbolSize\n\n/**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\nexports.getRowColCoords = function getRowColCoords (version) {\n if (version === 1) return []\n\n const posCount = Math.floor(version / 7) + 2\n const size = getSymbolSize(version)\n const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2\n const positions = [size - 7] // Last coord is always (size - 7)\n\n for (let i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals\n }\n\n positions.push(6) // First coord is always 6\n\n return positions.reverse()\n}\n\n/**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const coords = []\n const pos = exports.getRowColCoords(version)\n const posLength = pos.length\n\n for (let i = 0; i < posLength; i++) {\n for (let j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if ((i === 0 && j === 0) || // top-left\n (i === 0 && j === posLength - 1) || // bottom-left\n (i === posLength - 1 && j === 0)) { // top-right\n continue\n }\n\n coords.push([pos[i], pos[j]])\n }\n }\n\n return coords\n}\n","const getSymbolSize = require('./utils').getSymbolSize\nconst FINDER_PATTERN_SIZE = 7\n\n/**\n * Returns an array containing the positions of each finder pattern.\n * Each array's element represent the top-left point of the pattern as (x, y) coordinates\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const size = getSymbolSize(version)\n\n return [\n // top-left\n [0, 0],\n // top-right\n [size - FINDER_PATTERN_SIZE, 0],\n // bottom-left\n [0, size - FINDER_PATTERN_SIZE]\n ]\n}\n","/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n","const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n","const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n","const GF = require('./galois-field')\n\n/**\n * Multiplies two polynomials inside Galois Field\n *\n * @param {Uint8Array} p1 Polynomial\n * @param {Uint8Array} p2 Polynomial\n * @return {Uint8Array} Product of p1 and p2\n */\nexports.mul = function mul (p1, p2) {\n const coeff = new Uint8Array(p1.length + p2.length - 1)\n\n for (let i = 0; i < p1.length; i++) {\n for (let j = 0; j < p2.length; j++) {\n coeff[i + j] ^= GF.mul(p1[i], p2[j])\n }\n }\n\n return coeff\n}\n\n/**\n * Calculate the remainder of polynomials division\n *\n * @param {Uint8Array} divident Polynomial\n * @param {Uint8Array} divisor Polynomial\n * @return {Uint8Array} Remainder\n */\nexports.mod = function mod (divident, divisor) {\n let result = new Uint8Array(divident)\n\n while ((result.length - divisor.length) >= 0) {\n const coeff = result[0]\n\n for (let i = 0; i < divisor.length; i++) {\n result[i] ^= GF.mul(divisor[i], coeff)\n }\n\n // remove all zeros from buffer head\n let offset = 0\n while (offset < result.length && result[offset] === 0) offset++\n result = result.slice(offset)\n }\n\n return result\n}\n\n/**\n * Generate an irreducible generator polynomial of specified degree\n * (used by Reed-Solomon encoder)\n *\n * @param {Number} degree Degree of the generator polynomial\n * @return {Uint8Array} Buffer containing polynomial coefficients\n */\nexports.generateECPolynomial = function generateECPolynomial (degree) {\n let poly = new Uint8Array([1])\n for (let i = 0; i < degree; i++) {\n poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))\n }\n\n return poly\n}\n","const Polynomial = require('./polynomial')\n\nfunction ReedSolomonEncoder (degree) {\n this.genPoly = undefined\n this.degree = degree\n\n if (this.degree) this.initialize(this.degree)\n}\n\n/**\n * Initialize the encoder.\n * The input param should correspond to the number of error correction codewords.\n *\n * @param {Number} degree\n */\nReedSolomonEncoder.prototype.initialize = function initialize (degree) {\n // create an irreducible generator polynomial\n this.degree = degree\n this.genPoly = Polynomial.generateECPolynomial(this.degree)\n}\n\n/**\n * Encodes a chunk of data\n *\n * @param {Uint8Array} data Buffer containing input data\n * @return {Uint8Array} Buffer containing encoded data\n */\nReedSolomonEncoder.prototype.encode = function encode (data) {\n if (!this.genPoly) {\n throw new Error('Encoder not initialized')\n }\n\n // Calculate EC for this data block\n // extends data size to data+genPoly size\n const paddedData = new Uint8Array(data.length + this.degree)\n paddedData.set(data)\n\n // The error correction codewords are the remainder after dividing the data codewords\n // by a generator polynomial\n const remainder = Polynomial.mod(paddedData, this.genPoly)\n\n // return EC data blocks (last n byte, where n is the degree of genPoly)\n // If coefficients number in remainder are less than genPoly degree,\n // pad with 0s to the left to reach the needed number of coefficients\n const start = this.degree - remainder.length\n if (start > 0) {\n const buff = new Uint8Array(this.degree)\n buff.set(remainder, start)\n\n return buff\n }\n\n return remainder\n}\n\nmodule.exports = ReedSolomonEncoder\n","/**\n * Check if QR Code version is valid\n *\n * @param {Number} version QR Code version\n * @return {Boolean} true if valid version, false otherwise\n */\nexports.isValid = function isValid (version) {\n return !isNaN(version) && version >= 1 && version <= 40\n}\n","const numeric = '[0-9]+'\nconst alphanumeric = '[A-Z $%*+\\\\-./:]+'\nlet kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +\n '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +\n '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +\n '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'\nkanji = kanji.replace(/u/g, '\\\\u')\n\nconst byte = '(?:(?![A-Z0-9 $%*+\\\\-./:]|' + kanji + ')(?:.|[\\r\\n]))+'\n\nexports.KANJI = new RegExp(kanji, 'g')\nexports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\\\-./:]+', 'g')\nexports.BYTE = new RegExp(byte, 'g')\nexports.NUMERIC = new RegExp(numeric, 'g')\nexports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')\n\nconst TEST_KANJI = new RegExp('^' + kanji + '$')\nconst TEST_NUMERIC = new RegExp('^' + numeric + '$')\nconst TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\\\-./:]+$')\n\nexports.testKanji = function testKanji (str) {\n return TEST_KANJI.test(str)\n}\n\nexports.testNumeric = function testNumeric (str) {\n return TEST_NUMERIC.test(str)\n}\n\nexports.testAlphanumeric = function testAlphanumeric (str) {\n return TEST_ALPHANUMERIC.test(str)\n}\n","const VersionCheck = require('./version-check')\nconst Regex = require('./regex')\n\n/**\n * Numeric mode encodes data from the decimal digit set (0 - 9)\n * (byte values 30HEX to 39HEX).\n * Normally, 3 data characters are represented by 10 bits.\n *\n * @type {Object}\n */\nexports.NUMERIC = {\n id: 'Numeric',\n bit: 1 << 0,\n ccBits: [10, 12, 14]\n}\n\n/**\n * Alphanumeric mode encodes data from a set of 45 characters,\n * i.e. 10 numeric digits (0 - 9),\n * 26 alphabetic characters (A - Z),\n * and 9 symbols (SP, $, %, *, +, -, ., /, :).\n * Normally, two input characters are represented by 11 bits.\n *\n * @type {Object}\n */\nexports.ALPHANUMERIC = {\n id: 'Alphanumeric',\n bit: 1 << 1,\n ccBits: [9, 11, 13]\n}\n\n/**\n * In byte mode, data is encoded at 8 bits per character.\n *\n * @type {Object}\n */\nexports.BYTE = {\n id: 'Byte',\n bit: 1 << 2,\n ccBits: [8, 16, 16]\n}\n\n/**\n * The Kanji mode efficiently encodes Kanji characters in accordance with\n * the Shift JIS system based on JIS X 0208.\n * The Shift JIS values are shifted from the JIS X 0208 values.\n * JIS X 0208 gives details of the shift coded representation.\n * Each two-byte character value is compacted to a 13-bit binary codeword.\n *\n * @type {Object}\n */\nexports.KANJI = {\n id: 'Kanji',\n bit: 1 << 3,\n ccBits: [8, 10, 12]\n}\n\n/**\n * Mixed mode will contain a sequences of data in a combination of any of\n * the modes described above\n *\n * @type {Object}\n */\nexports.MIXED = {\n bit: -1\n}\n\n/**\n * Returns the number of bits needed to store the data length\n * according to QR Code specifications.\n *\n * @param {Mode} mode Data mode\n * @param {Number} version QR Code version\n * @return {Number} Number of bits\n */\nexports.getCharCountIndicator = function getCharCountIndicator (mode, version) {\n if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)\n\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid version: ' + version)\n }\n\n if (version >= 1 && version < 10) return mode.ccBits[0]\n else if (version < 27) return mode.ccBits[1]\n return mode.ccBits[2]\n}\n\n/**\n * Returns the most efficient mode to store the specified data\n *\n * @param {String} dataStr Input data string\n * @return {Mode} Best mode\n */\nexports.getBestModeForData = function getBestModeForData (dataStr) {\n if (Regex.testNumeric(dataStr)) return exports.NUMERIC\n else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC\n else if (Regex.testKanji(dataStr)) return exports.KANJI\n else return exports.BYTE\n}\n\n/**\n * Return mode name as string\n *\n * @param {Mode} mode Mode object\n * @returns {String} Mode name\n */\nexports.toString = function toString (mode) {\n if (mode && mode.id) return mode.id\n throw new Error('Invalid mode')\n}\n\n/**\n * Check if input param is a valid mode object\n *\n * @param {Mode} mode Mode object\n * @returns {Boolean} True if valid mode, false otherwise\n */\nexports.isValid = function isValid (mode) {\n return mode && mode.bit && mode.ccBits\n}\n\n/**\n * Get mode object from its name\n *\n * @param {String} string Mode name\n * @returns {Mode} Mode object\n */\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'numeric':\n return exports.NUMERIC\n case 'alphanumeric':\n return exports.ALPHANUMERIC\n case 'kanji':\n return exports.KANJI\n case 'byte':\n return exports.BYTE\n default:\n throw new Error('Unknown mode: ' + string)\n }\n}\n\n/**\n * Returns mode from a value.\n * If value is not a valid mode, returns defaultValue\n *\n * @param {Mode|String} value Encoding mode\n * @param {Mode} defaultValue Fallback value\n * @return {Mode} Encoding mode\n */\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","const Utils = require('./utils')\nconst ECCode = require('./error-correction-code')\nconst ECLevel = require('./error-correction-level')\nconst Mode = require('./mode')\nconst VersionCheck = require('./version-check')\n\n// Generator polynomial used to encode version information\nconst G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)\nconst G18_BCH = Utils.getBCHDigit(G18)\n\nfunction getBestVersionForDataLength (mode, length, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\nfunction getReservedBitsCount (mode, version) {\n // Character count indicator + mode indicator bits\n return Mode.getCharCountIndicator(mode, version) + 4\n}\n\nfunction getTotalBitsFromDataArray (segments, version) {\n let totalBits = 0\n\n segments.forEach(function (data) {\n const reservedBits = getReservedBitsCount(data.mode, version)\n totalBits += reservedBits + data.getBitsLength()\n })\n\n return totalBits\n}\n\nfunction getBestVersionForMixedData (segments, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n const length = getTotalBitsFromDataArray(segments, currentVersion)\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\n/**\n * Returns version number from a value.\n * If value is not a valid version, returns defaultValue\n *\n * @param {Number|String} value QR Code version\n * @param {Number} defaultValue Fallback value\n * @return {Number} QR Code version number\n */\nexports.from = function from (value, defaultValue) {\n if (VersionCheck.isValid(value)) {\n return parseInt(value, 10)\n }\n\n return defaultValue\n}\n\n/**\n * Returns how much data can be stored with the specified QR code version\n * and error correction level\n *\n * @param {Number} version QR Code version (1-40)\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} Quantity of storable data\n */\nexports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid QR Code version')\n }\n\n // Use Byte mode as default\n if (typeof mode === 'undefined') mode = Mode.BYTE\n\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n if (mode === Mode.MIXED) return dataTotalCodewordsBits\n\n const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)\n\n // Return max number of storable codewords\n switch (mode) {\n case Mode.NUMERIC:\n return Math.floor((usableBits / 10) * 3)\n\n case Mode.ALPHANUMERIC:\n return Math.floor((usableBits / 11) * 2)\n\n case Mode.KANJI:\n return Math.floor(usableBits / 13)\n\n case Mode.BYTE:\n default:\n return Math.floor(usableBits / 8)\n }\n}\n\n/**\n * Returns the minimum version needed to contain the amount of data\n *\n * @param {Segment} data Segment of data\n * @param {Number} [errorCorrectionLevel=H] Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} QR Code version\n */\nexports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {\n let seg\n\n const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)\n\n if (Array.isArray(data)) {\n if (data.length > 1) {\n return getBestVersionForMixedData(data, ecl)\n }\n\n if (data.length === 0) {\n return 1\n }\n\n seg = data[0]\n } else {\n seg = data\n }\n\n return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)\n}\n\n/**\n * Returns version information with relative error correction bits\n *\n * The version information is included in QR Code symbols of version 7 or larger.\n * It consists of an 18-bit sequence containing 6 data bits,\n * with 12 error correction bits calculated using the (18, 6) Golay code.\n *\n * @param {Number} version QR Code version\n * @return {Number} Encoded version info bits\n */\nexports.getEncodedBits = function getEncodedBits (version) {\n if (!VersionCheck.isValid(version) || version < 7) {\n throw new Error('Invalid QR Code version')\n }\n\n let d = version << 12\n\n while (Utils.getBCHDigit(d) - G18_BCH >= 0) {\n d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))\n }\n\n return (version << 12) | d\n}\n","const Utils = require('./utils')\n\nconst G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)\nconst G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)\nconst G15_BCH = Utils.getBCHDigit(G15)\n\n/**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\nexports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {\n const data = ((errorCorrectionLevel.bit << 3) | mask)\n let d = data << 10\n\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return ((data << 10) | d) ^ G15_MASK\n}\n","const Mode = require('./mode')\n\nfunction NumericData (data) {\n this.mode = Mode.NUMERIC\n this.data = data.toString()\n}\n\nNumericData.getBitsLength = function getBitsLength (length) {\n return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)\n}\n\nNumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nNumericData.prototype.getBitsLength = function getBitsLength () {\n return NumericData.getBitsLength(this.data.length)\n}\n\nNumericData.prototype.write = function write (bitBuffer) {\n let i, group, value\n\n // The input data string is divided into groups of three digits,\n // and each group is converted to its 10-bit binary equivalent.\n for (i = 0; i + 3 <= this.data.length; i += 3) {\n group = this.data.substr(i, 3)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, 10)\n }\n\n // If the number of input digits is not an exact multiple of three,\n // the final one or two digits are converted to 4 or 7 bits respectively.\n const remainingNum = this.data.length - i\n if (remainingNum > 0) {\n group = this.data.substr(i)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, remainingNum * 3 + 1)\n }\n}\n\nmodule.exports = NumericData\n","const Mode = require('./mode')\n\n/**\n * Array of characters available in alphanumeric mode\n *\n * As per QR Code specification, to each character\n * is assigned a value from 0 to 44 which in this case coincides\n * with the array index\n *\n * @type {Array}\n */\nconst ALPHA_NUM_CHARS = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n ' ', '$', '%', '*', '+', '-', '.', '/', ':'\n]\n\nfunction AlphanumericData (data) {\n this.mode = Mode.ALPHANUMERIC\n this.data = data\n}\n\nAlphanumericData.getBitsLength = function getBitsLength (length) {\n return 11 * Math.floor(length / 2) + 6 * (length % 2)\n}\n\nAlphanumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nAlphanumericData.prototype.getBitsLength = function getBitsLength () {\n return AlphanumericData.getBitsLength(this.data.length)\n}\n\nAlphanumericData.prototype.write = function write (bitBuffer) {\n let i\n\n // Input data characters are divided into groups of two characters\n // and encoded as 11-bit binary codes.\n for (i = 0; i + 2 <= this.data.length; i += 2) {\n // The character value of the first character is multiplied by 45\n let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45\n\n // The character value of the second digit is added to the product\n value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])\n\n // The sum is then stored as 11-bit binary number\n bitBuffer.put(value, 11)\n }\n\n // If the number of input data characters is not a multiple of two,\n // the character value of the final character is encoded as a 6-bit binary number.\n if (this.data.length % 2) {\n bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)\n }\n}\n\nmodule.exports = AlphanumericData\n","const Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n this.data = new TextEncoder().encode(data)\n } else {\n this.data = new Uint8Array(data)\n }\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n","const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin <self@wyattbaldwin.com>\n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","const Mode = require('./mode')\nconst NumericData = require('./numeric-data')\nconst AlphanumericData = require('./alphanumeric-data')\nconst ByteData = require('./byte-data')\nconst KanjiData = require('./kanji-data')\nconst Regex = require('./regex')\nconst Utils = require('./utils')\nconst dijkstra = require('dijkstrajs')\n\n/**\n * Returns UTF8 byte length\n *\n * @param {String} str Input string\n * @return {Number} Number of byte\n */\nfunction getStringByteLength (str) {\n return unescape(encodeURIComponent(str)).length\n}\n\n/**\n * Get a list of segments of the specified mode\n * from a string\n *\n * @param {Mode} mode Segment mode\n * @param {String} str String to process\n * @return {Array} Array of object with segments data\n */\nfunction getSegments (regex, mode, str) {\n const segments = []\n let result\n\n while ((result = regex.exec(str)) !== null) {\n segments.push({\n data: result[0],\n index: result.index,\n mode: mode,\n length: result[0].length\n })\n }\n\n return segments\n}\n\n/**\n * Extracts a series of segments with the appropriate\n * modes from a string\n *\n * @param {String} dataStr Input string\n * @return {Array} Array of object with segments data\n */\nfunction getSegmentsFromString (dataStr) {\n const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)\n const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)\n let byteSegs\n let kanjiSegs\n\n if (Utils.isKanjiModeEnabled()) {\n byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)\n kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)\n } else {\n byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)\n kanjiSegs = []\n }\n\n const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)\n\n return segs\n .sort(function (s1, s2) {\n return s1.index - s2.index\n })\n .map(function (obj) {\n return {\n data: obj.data,\n mode: obj.mode,\n length: obj.length\n }\n })\n}\n\n/**\n * Returns how many bits are needed to encode a string of\n * specified length with the specified mode\n *\n * @param {Number} length String length\n * @param {Mode} mode Segment mode\n * @return {Number} Bit length\n */\nfunction getSegmentBitsLength (length, mode) {\n switch (mode) {\n case Mode.NUMERIC:\n return NumericData.getBitsLength(length)\n case Mode.ALPHANUMERIC:\n return AlphanumericData.getBitsLength(length)\n case Mode.KANJI:\n return KanjiData.getBitsLength(length)\n case Mode.BYTE:\n return ByteData.getBitsLength(length)\n }\n}\n\n/**\n * Merges adjacent segments which have the same mode\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction mergeSegments (segs) {\n return segs.reduce(function (acc, curr) {\n const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null\n if (prevSeg && prevSeg.mode === curr.mode) {\n acc[acc.length - 1].data += curr.data\n return acc\n }\n\n acc.push(curr)\n return acc\n }, [])\n}\n\n/**\n * Generates a list of all possible nodes combination which\n * will be used to build a segments graph.\n *\n * Nodes are divided by groups. Each group will contain a list of all the modes\n * in which is possible to encode the given text.\n *\n * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.\n * The group for '12345' will contain then 3 objects, one for each\n * possible encoding mode.\n *\n * Each node represents a possible segment.\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction buildNodes (segs) {\n const nodes = []\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n\n switch (seg.mode) {\n case Mode.NUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.ALPHANUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.KANJI:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n break\n case Mode.BYTE:\n nodes.push([\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n }\n }\n\n return nodes\n}\n\n/**\n * Builds a graph from a list of nodes.\n * All segments in each node group will be connected with all the segments of\n * the next group and so on.\n *\n * At each connection will be assigned a weight depending on the\n * segment's byte length.\n *\n * @param {Array} nodes Array of object with segments data\n * @param {Number} version QR Code version\n * @return {Object} Graph of all possible segments\n */\nfunction buildGraph (nodes, version) {\n const table = {}\n const graph = { start: {} }\n let prevNodeIds = ['start']\n\n for (let i = 0; i < nodes.length; i++) {\n const nodeGroup = nodes[i]\n const currentNodeIds = []\n\n for (let j = 0; j < nodeGroup.length; j++) {\n const node = nodeGroup[j]\n const key = '' + i + j\n\n currentNodeIds.push(key)\n table[key] = { node: node, lastCount: 0 }\n graph[key] = {}\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n const prevNodeId = prevNodeIds[n]\n\n if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {\n graph[prevNodeId][key] =\n getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -\n getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)\n\n table[prevNodeId].lastCount += node.length\n } else {\n if (table[prevNodeId]) table[prevNodeId].lastCount = node.length\n\n graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +\n 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost\n }\n }\n }\n\n prevNodeIds = currentNodeIds\n }\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n graph[prevNodeIds[n]].end = 0\n }\n\n return { map: graph, table: table }\n}\n\n/**\n * Builds a segment from a specified data and mode.\n * If a mode is not specified, the more suitable will be used.\n *\n * @param {String} data Input data\n * @param {Mode | String} modesHint Data mode\n * @return {Segment} Segment\n */\nfunction buildSingleSegment (data, modesHint) {\n let mode\n const bestMode = Mode.getBestModeForData(data)\n\n mode = Mode.from(modesHint, bestMode)\n\n // Make sure data can be encoded\n if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {\n throw new Error('\"' + data + '\"' +\n ' cannot be encoded with mode ' + Mode.toString(mode) +\n '.\\n Suggested mode is: ' + Mode.toString(bestMode))\n }\n\n // Use Mode.BYTE if Kanji support is disabled\n if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {\n mode = Mode.BYTE\n }\n\n switch (mode) {\n case Mode.NUMERIC:\n return new NumericData(data)\n\n case Mode.ALPHANUMERIC:\n return new AlphanumericData(data)\n\n case Mode.KANJI:\n return new KanjiData(data)\n\n case Mode.BYTE:\n return new ByteData(data)\n }\n}\n\n/**\n * Builds a list of segments from an array.\n * Array can contain Strings or Objects with segment's info.\n *\n * For each item which is a string, will be generated a segment with the given\n * string and the more appropriate encoding mode.\n *\n * For each item which is an object, will be generated a segment with the given\n * data and mode.\n * Objects must contain at least the property \"data\".\n * If property \"mode\" is not present, the more suitable mode will be used.\n *\n * @param {Array} array Array of objects with segments data\n * @return {Array} Array of Segments\n */\nexports.fromArray = function fromArray (array) {\n return array.reduce(function (acc, seg) {\n if (typeof seg === 'string') {\n acc.push(buildSingleSegment(seg, null))\n } else if (seg.data) {\n acc.push(buildSingleSegment(seg.data, seg.mode))\n }\n\n return acc\n }, [])\n}\n\n/**\n * Builds an optimized sequence of segments from a string,\n * which will produce the shortest possible bitstream.\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @return {Array} Array of segments\n */\nexports.fromString = function fromString (data, version) {\n const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n\n const nodes = buildNodes(segs)\n const graph = buildGraph(nodes, version)\n const path = dijkstra.find_path(graph.map, 'start', 'end')\n\n const optimizedSegs = []\n for (let i = 1; i < path.length - 1; i++) {\n optimizedSegs.push(graph.table[path[i]].node)\n }\n\n return exports.fromArray(mergeSegments(optimizedSegs))\n}\n\n/**\n * Splits a string in various segments with the modes which\n * best represent their content.\n * The produced segments are far from being optimized.\n * The output of this function is only used to estimate a QR Code version\n * which may contain the data.\n *\n * @param {string} data Input string\n * @return {Array} Array of segments\n */\nexports.rawSplit = function rawSplit (data) {\n return exports.fromArray(\n getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n )\n}\n","const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n","function hex2rgba (hex) {\n if (typeof hex === 'number') {\n hex = hex.toString()\n }\n\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string')\n }\n\n let hexCode = hex.slice().replace('#', '').split('')\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex)\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c]\n }))\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F')\n\n const hexValue = parseInt(hexCode.join(''), 16)\n\n return {\n r: (hexValue >> 24) & 255,\n g: (hexValue >> 16) & 255,\n b: (hexValue >> 8) & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n }\n}\n\nexports.getOptions = function getOptions (options) {\n if (!options) options = {}\n if (!options.color) options.color = {}\n\n const margin = typeof options.margin === 'undefined' ||\n options.margin === null ||\n options.margin < 0\n ? 4\n : options.margin\n\n const width = options.width && options.width >= 21 ? options.width : undefined\n const scale = options.scale || 4\n\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n }\n}\n\nexports.getScale = function getScale (qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2\n ? opts.width / (qrSize + opts.margin * 2)\n : opts.scale\n}\n\nexports.getImageWidth = function getImageWidth (qrSize, opts) {\n const scale = exports.getScale(qrSize, opts)\n return Math.floor((qrSize + opts.margin * 2) * scale)\n}\n\nexports.qrToImageData = function qrToImageData (imgData, qr, opts) {\n const size = qr.modules.size\n const data = qr.modules.data\n const scale = exports.getScale(size, opts)\n const symbolSize = Math.floor((size + opts.margin * 2) * scale)\n const scaledMargin = opts.margin * scale\n const palette = [opts.color.light, opts.color.dark]\n\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4\n let pxColor = opts.color.light\n\n if (i >= scaledMargin && j >= scaledMargin &&\n i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale)\n const jSrc = Math.floor((j - scaledMargin) / scale)\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]\n }\n\n imgData[posDst++] = pxColor.r\n imgData[posDst++] = pxColor.g\n imgData[posDst++] = pxColor.b\n imgData[posDst] = pxColor.a\n }\n }\n}\n","const Utils = require('./utils')\n\nfunction clearCanvas (ctx, canvas, size) {\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n if (!canvas.style) canvas.style = {}\n canvas.height = size\n canvas.width = size\n canvas.style.height = size + 'px'\n canvas.style.width = size + 'px'\n}\n\nfunction getCanvasElement () {\n try {\n return document.createElement('canvas')\n } catch (e) {\n throw new Error('You need to specify a canvas element')\n }\n}\n\nexports.render = function render (qrData, canvas, options) {\n let opts = options\n let canvasEl = canvas\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!canvas) {\n canvasEl = getCanvasElement()\n }\n\n opts = Utils.getOptions(opts)\n const size = Utils.getImageWidth(qrData.modules.size, opts)\n\n const ctx = canvasEl.getContext('2d')\n const image = ctx.createImageData(size, size)\n Utils.qrToImageData(image.data, qrData, opts)\n\n clearCanvas(ctx, canvasEl, size)\n ctx.putImageData(image, 0, 0)\n\n return canvasEl\n}\n\nexports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {\n let opts = options\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!opts) opts = {}\n\n const canvasEl = exports.render(qrData, canvas, opts)\n\n const type = opts.type || 'image/png'\n const rendererOpts = opts.rendererOpts || {}\n\n return canvasEl.toDataURL(type, rendererOpts.quality)\n}\n","const Utils = require('./utils')\n\nfunction getColorAttrib (color, attrib) {\n const alpha = color.a / 255\n const str = attrib + '=\"' + color.hex + '\"'\n\n return alpha < 1\n ? str + ' ' + attrib + '-opacity=\"' + alpha.toFixed(2).slice(1) + '\"'\n : str\n}\n\nfunction svgCmd (cmd, x, y) {\n let str = cmd + x\n if (typeof y !== 'undefined') str += ' ' + y\n\n return str\n}\n\nfunction qrToPath (data, size, margin) {\n let path = ''\n let moveBy = 0\n let newRow = false\n let lineLength = 0\n\n for (let i = 0; i < data.length; i++) {\n const col = Math.floor(i % size)\n const row = Math.floor(i / size)\n\n if (!col && !newRow) newRow = true\n\n if (data[i]) {\n lineLength++\n\n if (!(i > 0 && col > 0 && data[i - 1])) {\n path += newRow\n ? svgCmd('M', col + margin, 0.5 + row + margin)\n : svgCmd('m', moveBy, 0)\n\n moveBy = 0\n newRow = false\n }\n\n if (!(col + 1 < size && data[i + 1])) {\n path += svgCmd('h', lineLength)\n lineLength = 0\n }\n } else {\n moveBy++\n }\n }\n\n return path\n}\n\nexports.render = function render (qrData, options, cb) {\n const opts = Utils.getOptions(options)\n const size = qrData.modules.size\n const data = qrData.modules.data\n const qrcodesize = size + opts.margin * 2\n\n const bg = !opts.color.light.a\n ? ''\n : '<path ' + getColorAttrib(opts.color.light, 'fill') +\n ' d=\"M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z\"/>'\n\n const path =\n '<path ' + getColorAttrib(opts.color.dark, 'stroke') +\n ' d=\"' + qrToPath(data, size, opts.margin) + '\"/>'\n\n const viewBox = 'viewBox=\"' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '\"'\n\n const width = !opts.width ? '' : 'width=\"' + opts.width + '\" height=\"' + opts.width + '\" '\n\n const svgTag = '<svg xmlns=\"http://www.w3.org/2000/svg\" ' + width + viewBox + ' shape-rendering=\"crispEdges\">' + bg + path + '</svg>\\n'\n\n if (typeof cb === 'function') {\n cb(null, svgTag)\n }\n\n return svgTag\n}\n","\nconst canPromise = require('./can-promise')\n\nconst QRCode = require('./core/qrcode')\nconst CanvasRenderer = require('./renderer/canvas')\nconst SvgRenderer = require('./renderer/svg-tag.js')\n\nfunction renderCanvas (renderFunc, canvas, text, opts, cb) {\n const args = [].slice.call(arguments, 1)\n const argsNum = args.length\n const isLastArgCb = typeof args[argsNum - 1] === 'function'\n\n if (!isLastArgCb && !canPromise()) {\n throw new Error('Callback required as last argument')\n }\n\n if (isLastArgCb) {\n if (argsNum < 2) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 2) {\n cb = text\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 3) {\n if (canvas.getContext && typeof cb === 'undefined') {\n cb = opts\n opts = undefined\n } else {\n cb = opts\n opts = text\n text = canvas\n canvas = undefined\n }\n }\n } else {\n if (argsNum < 1) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 1) {\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 2 && !canvas.getContext) {\n opts = text\n text = canvas\n canvas = undefined\n }\n\n return new Promise(function (resolve, reject) {\n try {\n const data = QRCode.create(text, opts)\n resolve(renderFunc(data, canvas, opts))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n try {\n const data = QRCode.create(text, opts)\n cb(null, renderFunc(data, canvas, opts))\n } catch (e) {\n cb(e)\n }\n}\n\nexports.create = QRCode.create\nexports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)\nexports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)\n\n// only svg for now.\nexports.toString = renderCanvas.bind(null, function (data, _, opts) {\n return SvgRenderer.render(data, opts)\n})\n","import QRCode from 'qrcode';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\n// 對於内容少的qrcode,增大容錯率\n// Increase the fault tolerance for QrCode with less content\nfunction getErrorCorrectionLevel(content) {\n if (content.length > 36) {\n return 'M';\n }\n else if (content.length > 16) {\n return 'Q';\n }\n else {\n return 'H';\n }\n}\n/**\n * load image, resolve image\n * 加載圖片\n * @param logoSrc\n * @param crossOrigin\n * @returns\n */\nfunction loadImage(logoSrc, crossOrigin) {\n var image = new Image();\n image.setAttribute('crossOrigin', crossOrigin || 'anonymous');\n image.src = logoSrc;\n return new Promise(function (resolve, reject) {\n image.onload = function () {\n resolve(image);\n };\n image.onerror = function () {\n reject('logo load fail!');\n };\n });\n}\n/**\n * draw radius\n * 繪製帶圓角的綫條\n * @param ctx\n * @returns\n */\nvar canvasRoundRect = function (ctx) {\n return function (x, y, w, h, r) {\n var minSize = Math.min(w, h);\n if (r > minSize / 2) {\n r = minSize / 2;\n }\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.arcTo(x + w, y, x + w, y + h, r);\n ctx.arcTo(x + w, y + h, x, y + h, r);\n ctx.arcTo(x, y + h, x, y, r);\n ctx.arcTo(x, y, x + w, y, r);\n ctx.closePath();\n return ctx;\n };\n};\n/**\n * 判斷是否是函數\n * Determine if it is a function\n * @param o {function} 函數\n */\nfunction isFunction(o) {\n return typeof o === 'function';\n}\n/**\n * canvas get base64 url and set image src value, if need download image, auto download image\n * 獲取 canvas base64 並賦值給 image 的 src 屬性\n * @param options\n * @returns\n */\nvar toImage = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var canvas, download, image, downloadName, startDownload;\n return __generator(this, function (_a) {\n canvas = options.canvas, download = options.download;\n image = options.image, downloadName = options.downloadName;\n if (canvas.toDataURL()) {\n image.src = canvas.toDataURL();\n }\n else {\n throw new Error('Can not get the canvas DataURL');\n }\n if (download !== true && !isFunction(download)) {\n return [2 /*return*/];\n }\n // download also can be a function\n download =\n download === true ? function (start) { return start(); } : download;\n startDownload = function () {\n return saveImage(image, downloadName);\n };\n if (download) {\n return [2 /*return*/, download(startDownload)];\n }\n return [2 /*return*/, Promise.resolve()];\n });\n });\n};\n/**\n * save image 保存圖片\n * @param image HTMLImageElement\n * @param name image name\n * @returns\n */\nvar saveImage = function (image, name) {\n return new Promise(function (resolve, reject) {\n try {\n var dataURL = image.src;\n var link = document.createElement('a');\n link.download = name;\n link.href = dataURL;\n link.dispatchEvent(new MouseEvent('click'));\n resolve(true);\n }\n catch (err) {\n reject(err);\n }\n });\n};\n\nvar dotTypes = {\n tile: 'tile',\n dot: 'dot',\n dotSmall: 'dot-small',\n rounded: 'rounded',\n square: 'square',\n diamond: 'diamond',\n star: 'star',\n fluid: 'fluid',\n fluidLine: 'fluid-line',\n stripe: 'stripe',\n stripeRow: 'stripe-row',\n stripeColumn: 'stripe-column'\n};\nvar QRDot = /** @class */ (function () {\n function QRDot(options) {\n this._context = options.context;\n this._type = options.type;\n this.dotSize = options.dotSize;\n }\n QRDot.prototype.draw = function (x, y, getNeighbor, qrCanvas, i, j) {\n var context = this._context;\n var type = this._type;\n var drawFunction;\n switch (type) {\n case dotTypes.tile:\n drawFunction = this._drawTile;\n break;\n case dotTypes.dot:\n drawFunction = this._drawDot;\n break;\n case dotTypes.dotSmall:\n drawFunction = this._drawDotSmall;\n break;\n case dotTypes.rounded:\n drawFunction = this._drawRounded;\n break;\n case dotTypes.diamond:\n drawFunction = this._drawDiamond;\n break;\n case dotTypes.star:\n drawFunction = this._drawStar;\n break;\n case dotTypes.fluid:\n drawFunction = this._drawFluid;\n break;\n case dotTypes.fluidLine:\n drawFunction = this._drawFluidLine;\n break;\n case dotTypes.stripe:\n drawFunction = this._drawStripe;\n break;\n case dotTypes.stripeRow:\n drawFunction = this._drawStripeRow;\n break;\n case dotTypes.stripeColumn:\n drawFunction = this._drawStripeColumn;\n break;\n case dotTypes.square:\n default:\n drawFunction = this._drawSquare;\n break;\n }\n drawFunction.call(this, {\n x: x,\n y: y,\n size: this.dotSize,\n context: context,\n getNeighbor: getNeighbor,\n qrCanvas: qrCanvas,\n i: i,\n j: j\n });\n };\n QRDot.prototype._drawSquare = function (_a) {\n var x = _a.x, y = _a.y, size = _a.size, context = _a.context;\n this._basicSquare({ x: x, y: y, size: size, context: context, rotation: 0 });\n };\n QRDot.prototype._basicSquare = function (args) {\n var size = args.size, context = args.context;\n this._rotateFigure(__assign(__assign({}, args), { draw: function () {\n context.rect(-size / 2, -size / 2, size, size);\n } }));\n };\n QRDot.prototype._drawDot = function (args) {\n this._drawBasicDot(args);\n };\n QRDot.prototype._drawDotSmall = function (args) {\n this._drawBasicDot(__assign(__assign({}, args), { dotRate: 0.3 }));\n };\n QRDot.prototype._drawBasicDot = function (args) {\n var x = args.x, y = args.y, size = args.size, context = args.context, _a = args.dotRate, dotRate = _a === void 0 ? 0.4 : _a;\n var cx = x + size / 2;\n var cy = y + size / 2;\n context.beginPath();\n context.arc(cx, cy, size * dotRate, 0, Math.PI * 2);\n context.closePath();\n // 一次性填充会糊掉,一个个填则没有问题\n context.fill();\n };\n QRDot.prototype._drawRounded = function (_a) {\n var x = _a.x, y = _a.y, size = _a.size, context = _a.context;\n size = 0.75 * size;\n x += (1 / 8) * size;\n y += (1 / 8) * size;\n var cx = x + size / 2;\n var cy = y + size / 2;\n var originX = -size / 2;\n context.translate(cx, cy);\n canvasRoundRect(context)(originX, originX, size, size, size / 4);\n context.fill();\n context.translate(-cx, -cy);\n };\n QRDot.prototype._drawTile = function (args) {\n var size = args.size, context = args.context;\n this._rotateFigure(__assign(__assign({}, args), { draw: function () {\n context.rect(-size / 2, -size / 2, size - 1, size - 1);\n } }));\n };\n QRDot.prototype._drawDiamond = function (args) {\n var size = args.size, context = args.context;\n this._rotateFigure(__assign(__assign({}, args), { rotation: Math.PI / 4, draw: function () {\n size = (0.5 * size) / Math.sin(Math.PI / 4);\n context.rect(-size / 2, -size / 2, size, size);\n } }));\n };\n QRDot.prototype._drawStar = function (args) {\n var size = args.size, context = args.context;\n this._rotateFigure(__assign(__assign({}, args), { rotation: Math.PI / 4, draw: function () {\n context.moveTo(-size / 2, -size / 2);\n context.quadraticCurveTo(0, 0, size / 2, -size / 2);\n context.quadraticCurveTo(0, 0, size / 2, size / 2);\n context.quadraticCurveTo(0, 0, -size / 2, size / 2);\n context.quadraticCurveTo(0, 0, -size / 2, -size / 2);\n } }));\n };\n QRDot.prototype._drawFluidLine = function (args) {\n this._drawFluid(args, true);\n };\n QRDot.prototype._drawFluid = function (_a, line) {\n var x = _a.x, y = _a.y, size = _a.size, context = _a.context, getNeighbor = _a.getNeighbor;\n if (line === void 0) { line = false; }\n var roundedCorners = [false, false, false, false]; // top-left, top-right, bottom-right, bottom-left\n if (!getNeighbor(0, -1) && !getNeighbor(-1, 0))\n roundedCorners[0] = true;\n if (!getNeighbor(1, 0) && !getNeighbor(0, -1))\n roundedCorners[1] = true;\n if (!getNeighbor(0, 1) && !getNeighbor(1, 0))\n roundedCorners[2] = true;\n if (!getNeighbor(0, 1) && !getNeighbor(-1, 0))\n roundedCorners[3] = true;\n var cx = x + size / 2;\n var cy = y + size / 2;\n context.translate(cx, cy);\n context.beginPath();\n context.arc(0, 0, size / 2, 0, 2 * Math.PI, false);\n context.closePath();\n context.fill();\n if (!roundedCorners[0])\n context.fillRect(-size / 2, -size / 2, size / 2, size / 2);\n if (!roundedCorners[1])\n context.fillRect(0, -size / 2, size / 2, size / 2);\n if (!roundedCorners[2])\n context.fillRect(0, 0, size / 2, size / 2);\n if (!roundedCorners[3])\n context.fillRect(-size / 2, 0, size / 2, size / 2);\n if (line && !getNeighbor(0, 1)) {\n if (getNeighbor(-1, 1)) {\n context.beginPath();\n context.arc(-size, 0, size / 2, 0, 0.5 * Math.PI, false);\n context.arc(0, size, size / 2, Math.PI, 1.5 * Math.PI, false);\n context.closePath();\n context.stroke();\n context.fill();\n }\n if (getNeighbor(1, 1)) {\n context.beginPath();\n context.arc(size, 0, size / 2, 0.5 * Math.PI, Math.PI, false);\n context.arc(0, size, size / 2, 1.5 * Math.PI, 0, false);\n context.closePath();\n context.stroke();\n context.fill();\n }\n }\n context.translate(-cx, -cy);\n };\n QRDot.prototype._drawStripeColumn = function (args) {\n return this._drawStripe(args, 'column');\n };\n QRDot.prototype._drawStripeRow = function (args) {\n return this._drawStripe(args, 'row');\n };\n QRDot.prototype._drawStripe = function (_a, type) {\n var x = _a.x, y = _a.y, size = _a.size, context = _a.context, qrCanvas = _a.qrCanvas, i = _a.i, j = _a.j;\n if (type === void 0) { type = 'default'; }\n function setRangeDisabled(width, height) {\n for (var i1 = i; i1 < i + width; i1++) {\n for (var j1 = j; j1 < j + height; j1++) {\n qrCanvas.setDisabled(i1, j1);\n }\n }\n }\n function getRangeTrue(width, height) {\n var isTrue = true;\n for (var i1 = i; i1 < i + width; i1++) {\n for (var j1 = j; j1 < j + height; j1++) {\n if (!qrCanvas.isDark(i1, j1)) {\n isTrue = false;\n break;\n }\n }\n if (!isTrue) {\n break;\n }\n }\n return isTrue;\n }\n function drawItem(width, height) {\n var cx = x + size / 2;\n var cy = y + size / 2;\n context.translate(cx, cy);\n context.beginPath();\n if (width === 1 && height === 1) {\n // 画圆点\n context.arc(0, 0, size / 4, 0, 2 * Math.PI, false);\n }\n else if (width > 1) {\n // 画横\n context.arc(0, 0, size / 4, 0.5 * Math.PI, 1.5 * Math.PI, false);\n context.arc(size * (width - 1), 0, size / 4, 1.5 * Math.PI, 0.5 * Math.PI, false);\n }\n else if (height > 1) {\n // 画竖\n context.arc(0, 0, size / 4, Math.PI, 2 * Math.PI, false);\n context.arc(0, size * (height - 1), size / 4, 0, Math.PI, false);\n }\n context.fill();\n context.closePath();\n context.translate(-cx, -cy);\n setRangeDisabled(width, height);\n }\n var array = type === 'row'\n ? [\n [3, 1],\n [2, 1],\n [1, 1]\n ]\n : type === 'column'\n ? [\n [1, 3],\n [1, 2],\n [1, 1]\n ]\n : [\n [3, 1],\n [1, 3],\n [2, 1],\n [1, 2],\n [1, 1]\n ];\n array.forEach(function (comb) {\n if (getRangeTrue(comb[0], comb[1])) {\n drawItem(comb[0], comb[1]);\n }\n });\n };\n QRDot.prototype._rotateFigure = function (_a) {\n var x = _a.x, y = _a.y, size = _a.size, context = _a.context, _b = _a.rotation, rotation = _b === void 0 ? 0 : _b, draw = _a.draw;\n var cx = x + size / 2;\n var cy = y + size / 2;\n context.translate(cx, cy);\n rotation && context.rotate(rotation);\n draw();\n context.closePath();\n rotation && context.rotate(-rotation);\n context.translate(-cx, -cy);\n };\n return QRDot;\n}());\n\nvar cornerTypes = {\n square: 'square',\n rounded: 'rounded',\n circle: 'circle',\n roundedCircle: 'rounded-circle',\n circleRounded: 'circle-rounded',\n circleDiamond: 'circle-diamond',\n circleStar: 'circle-star'\n};\nvar QRCorner = /** @class */ (function () {\n function QRCorner(context, cornerType, color) {\n this.context = context;\n this.cornerType = cornerType;\n this.color = color;\n }\n QRCorner.prototype.draw = function (_a) {\n var radius = _a.radius, x = _a.x, y = _a.y, dotSize = _a.dotSize;\n var drawFunction;\n switch (this.cornerType) {\n case cornerTypes.circle:\n drawFunction = this._drawCircle;\n break;\n case cornerTypes.rounded:\n drawFunction = this._drawRounded;\n break;\n case cornerTypes.roundedCircle:\n drawFunction = this._drawRoundedCircle;\n break;\n case cornerTypes.circleRounded:\n drawFunction = this._drawCircleRounded;\n break;\n case cornerTypes.circleDiamond:\n drawFunction = this._drawCircleDiamond;\n break;\n case cornerTypes.circleStar:\n drawFunction = this._drawCircleStar;\n break;\n case cornerTypes.square:\n default:\n drawFunction = this._drawSquare;\n break;\n }\n drawFunction.call(this, { x: x, y: y, radius: radius, dotSize: dotSize });\n };\n QRCorner.prototype._drawRoundedCircle = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize, radius = _a.radius;\n var _radius = typeof radius === 'number' ? radius : (radius === null || radius === void 0 ? void 0 : radius.outer) || dotSize / 2;\n this.drawRoundedSquare(dotSize, x, y, dotSize * 7, _radius, false, 0);\n this.drawCircle(dotSize, x + 2 * dotSize, y + 2 * dotSize, dotSize * 3, true);\n };\n QRCorner.prototype._drawCircleRounded = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize, radius = _a.radius;\n this.drawCircle(dotSize, x, y, dotSize * 7, false);\n var _radius = typeof radius === 'number' ? radius : (radius === null || radius === void 0 ? void 0 : radius.inner) || dotSize / 4;\n this.drawRoundedSquare(dotSize, x + 2 * dotSize, y + 2 * dotSize, dotSize * 3, _radius, true, 0);\n };\n QRCorner.prototype._drawCircleDiamond = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize;\n this.drawCircle(dotSize, x, y, dotSize * 7, false);\n this.drawRoundedSquare(dotSize, x + 2 * dotSize, y + 2 * dotSize, dotSize * 3, 0, true, (45 * Math.PI) / 180);\n };\n QRCorner.prototype._drawCircleStar = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize;\n this.drawCircle(dotSize, x, y, dotSize * 7, false);\n this.drawInnerStar(x + 2 * dotSize, y + 2 * dotSize, dotSize * 3);\n };\n QRCorner.prototype._drawSquare = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize;\n return this._drawBasicRounded({ x: x, y: y, dotSize: dotSize, radius: 0 });\n };\n QRCorner.prototype._drawRounded = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize, radius = _a.radius;\n var inner = typeof radius === 'number' ? radius : (radius === null || radius === void 0 ? void 0 : radius.inner) || dotSize / 4;\n var outer = typeof radius === 'number' ? radius : (radius === null || radius === void 0 ? void 0 : radius.outer) || dotSize / 2;\n return this._drawBasicRounded({\n x: x,\n y: y,\n dotSize: dotSize,\n radius: {\n inner: inner,\n outer: outer\n }\n });\n };\n QRCorner.prototype._drawCircle = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize;\n this.drawCircle(dotSize, x, y, dotSize * 7, false);\n this.drawCircle(dotSize, x + 2 * dotSize, y + 2 * dotSize, dotSize * 3, true);\n };\n QRCorner.prototype._drawBasicRounded = function (_a) {\n var x = _a.x, y = _a.y, dotSize = _a.dotSize, radius = _a.radius, _b = _a.rotation, rotation = _b === void 0 ? 0 : _b;\n var lineWidth = Math.ceil(dotSize);\n var radiusOuter;\n var radiusInner;\n if (typeof radius !== 'number') {\n radiusOuter = radius.outer || 0;\n radiusInner = radius.inner || 0;\n }\n else {\n radiusOuter = radius;\n radiusInner = radiusOuter;\n }\n var size = dotSize * 7;\n // Outer box\n this.drawRoundedSquare(lineWidth, x, y, size, radiusOuter, false, rotation);\n // Inner box\n size = dotSize * 3;\n y += dotSize * 2;\n x += dotSize * 2;\n this.drawRoundedSquare(lineWidth, x, y, size, radiusInner, true, rotation);\n };\n QRCorner.prototype.drawCircle = function (lineWidth, x, y, size, fill) {\n var ctx = this.context;\n var color = this.color;\n ctx.lineWidth = lineWidth;\n ctx.fillStyle = color;\n ctx.strokeStyle = color;\n y += size / 2;\n x += size / 2;\n size -= lineWidth;\n ctx.beginPath();\n ctx.arc(x, y, size / 2, 0, Math.PI * 2);\n ctx.stroke();\n ctx.closePath();\n if (fill) {\n ctx.fill();\n }\n };\n QRCorner.prototype.drawRoundedSquare = function (lineWidth, x, y, size, radius, fill, rotation) {\n var ctx = this.context;\n var color = this.color;\n ctx.lineWidth = lineWidth;\n ctx.fillStyle = color;\n ctx.strokeStyle = color;\n // Adjust coordinates so that the outside of the stroke is aligned to the edges\n y += lineWidth / 2;\n x += lineWidth / 2;\n size -= lineWidth;\n if (!Array.isArray(radius)) {\n radius = [radius, radius, radius, radius];\n }\n // Radius should not be greater than half the size or less than zero\n radius = radius.map(function (r) {\n r = Math.min(r, size / 2);\n return r < 0 ? 0 : r;\n });\n var rTopLeft = radius[0] || 0;\n var rTopRight = radius[1] || 0;\n var rBottomRight = radius[2] || 0;\n var rBottomLeft = radius[3] || 0;\n ctx.beginPath();\n var cx = x + size / 2;\n var cy = y + size / 2;\n var originX = -size / 2;\n ctx.translate(cx, cy);\n rotation && ctx.rotate(rotation);\n ctx.moveTo(originX + rTopLeft, originX);\n ctx.lineTo(originX + size - rTopRight, originX);\n if (rTopRight)\n ctx.quadraticCurveTo(originX + size, originX, originX + size, originX + rTopRight);\n ctx.lineTo(originX + size, originX + size - rBottomRight);\n if (rBottomRight)\n ctx.quadraticCurveTo(originX + size, originX + size, originX + size - rBottomRight, originX + size);\n ctx.lineTo(originX + rBottomLeft, originX + size);\n if (rBottomLeft)\n ctx.quadraticCurveTo(originX, originX + size, originX, originX + size - rBottomLeft);\n ctx.lineTo(originX, originX + rTopLeft);\n if (rTopLeft)\n ctx.quadraticCurveTo(originX, originX, originX + rTopLeft, originX);\n ctx.closePath();\n ctx.stroke();\n if (fill) {\n ctx.fill();\n }\n rotation && ctx.rotate(-rotation);\n ctx.translate(-cx, -cy);\n };\n QRCorner.prototype.drawInnerStar = function (x, y, size) {\n var context = this.context;\n var cx = x + size / 2;\n var cy = y + size / 2;\n context.translate(cx, cy);\n context.beginPath();\n context.moveTo(-size / 2, -size / 2);\n context.quadraticCurveTo(0, -size / 4, size / 2, -size / 2);\n context.quadraticCurveTo(size / 4, 0, size / 2, size / 2);\n context.quadraticCurveTo(0, size / 4, -size / 2, size / 2);\n context.quadraticCurveTo(-size / 4, 0, -size / 2, -size / 2);\n context.closePath();\n context.fill();\n context.translate(-cx, -cy);\n };\n return QRCorner;\n}());\n\nvar defaultOptions = {\n logo: {\n bgColor: '#fff',\n borderWidth: 10,\n crossOrigin: 'anonymous',\n borderRadius: 8,\n logoRadius: 0\n },\n width: 380,\n download: false,\n downloadName: 'qr-code.png',\n nodeQrCodeOptions: {\n margin: 4,\n color: {\n dark: '#000',\n light: '#fff'\n }\n },\n dotsOptions: {\n type: 'square',\n color: '#000'\n },\n cornersOptions: {\n type: 'square',\n color: '#000'\n }\n};\n\nvar squareMask = [\n [1, 1, 1, 1, 1, 1, 1],\n [1, 0, 0, 0, 0, 0, 1],\n [1, 0, 0, 0, 0, 0, 1],\n [1, 0, 0, 0, 0, 0, 1],\n [1, 0, 0, 0, 0, 0, 1],\n [1, 0, 0, 0, 0, 0, 1],\n [1, 1, 1, 1, 1, 1, 1]\n];\nvar dotMask = [\n [0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0],\n [0, 0, 1, 1, 1, 0, 0],\n [0, 0, 1, 1, 1, 0, 0],\n [0, 0, 1, 1, 1, 0, 0],\n [0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0]\n];\nvar ErrorCorrectionPercents = {\n L: 0.07,\n M: 0.15,\n Q: 0.25,\n H: 0.3\n};\nvar QRCanvas = /** @class */ (function () {\n function QRCanvas(options) {\n this.qrcodeArray = [];\n /**dotSize: Integer */\n this.dotSize = 0;\n /**offset: Integer */\n this.offset = 0;\n var canvas = options.canvas, content = options.content, _a = options.width, width = _a === void 0 ? defaultOptions.width : _a, _b = options.nodeQrCodeOptions, nodeQrCodeOptions = _b === void 0 ? {} : _b;\n // 默認對内容少的二維碼采用高容錯率,内容多的二維碼采用低容錯率\n // according to the content length to choose different errorCorrectionLevel\n nodeQrCodeOptions.errorCorrectionLevel =\n nodeQrCodeOptions.errorCorrectionLevel || getErrorCorrectionLevel(content);\n var QRDATA = QRCode.create(content, nodeQrCodeOptions);\n this.canvas = canvas;\n this.options = options;\n this.canvas.setAttribute('width', width + '');\n this.canvas.setAttribute('height', width + '');\n this.saveQrdata(QRDATA);\n }\n /**\n * clear canvas 清理畫布\n */\n QRCanvas.prototype.clear = function () {\n var canvasContext = this.context;\n if (canvasContext) {\n canvasContext.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n };\n Object.defineProperty(QRCanvas.prototype, \"context\", {\n get: function () {\n return this.canvas.getContext('2d');\n },\n enumerable: false,\n configurable: true\n });\n /**\n * 保存qrcode原始數據\n * @param QRDATA\n */\n QRCanvas.prototype.saveQrdata = function (QRDATA) {\n var _a;\n this.size = QRDATA.modules.size;\n this.version = QRDATA.version;\n this.qrcodeArray = QRDATA.modules.data;\n var nodeQrCodeOptions = this.options.nodeQrCodeOptions;\n var margin = (nodeQrCodeOptions === null || nodeQrCodeOptions === void 0 ? void 0 : nodeQrCodeOptions.margin) || defaultOptions.nodeQrCodeOptions.margin;\n var count = this.size;\n var width = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.width) || defaultOptions.width;\n /**\n * 二維碼去除 margin 后的實際寬度\n */\n var withoutMarginSize = width - margin * 2;\n /**每个像素点宽度 */\n this.dotSize = Math.floor(withoutMarginSize / count);\n this.offset = Math.floor((width - count * this.dotSize) / 2);\n };\n /**初始化 */\n QRCanvas.prototype.init = function () {\n return __awaiter(this, void 0, void 0, function () {\n var drawFunction;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.clear();\n this.drawBackground();\n return [4 /*yield*/, this.drawLogo()];\n case 1:\n drawFunction = _a.sent();\n this.drawDots();\n this.drawCorners();\n drawFunction && drawFunction.call(this);\n return [2 /*return*/];\n }\n });\n });\n };\n QRCanvas.prototype.drawLogo = function () {\n var _a;\n var logo = (_a = this.options) === null || _a === void 0 ? void 0 : _a.logo;\n if (logo) {\n if (typeof logo === 'string') {\n logo = { src: logo };\n }\n return this._drawLogo(logo);\n }\n else {\n return Promise.resolve(null);\n }\n };\n QRCanvas.prototype._drawLogo = function (logo) {\n return __awaiter(this, void 0, void 0, function () {\n var context, canvas, coverLevel, maxHiddenDots, src, _a, bgColor, _b, borderWidth, _c, crossOrigin, _d, borderRadius, _e, logoRadius, image, rate, logoWidth, logoHeight, logoInnerWidth, logoInnerHeight, maxHeight, xStart, xEnd, yStart, yEnd;\n return __generator(this, function (_f) {\n switch (_f.label) {\n case 0:\n context = this.context;\n canvas = this.canvas;\n coverLevel = ErrorCorrectionPercents[this.options.nodeQrCodeOptions.errorCorrectionLevel];\n maxHiddenDots = Math.floor(coverLevel * coverLevel * this.size * this.size);\n src = logo.src, _a = logo.bgColor, bgColor = _a === void 0 ? defaultOptions.logo.bgColor : _a, _b = logo.borderWidth, borderWidth = _b === void 0 ? defaultOptions.logo.borderWidth : _b, _c = logo.crossOrigin, crossOrigin = _c === void 0 ? defaultOptions.logo.crossOrigin : _c, _d = logo.borderRadius, borderRadius = _d === void 0 ? defaultOptions.logo.borderRadius : _d, _e = logo.logoRadius, logoRadius = _e === void 0 ? defaultOptions.logo.logoRadius : _e;\n return [4 /*yield*/, loadImage(src, crossOrigin)];\n case 1:\n image = _f.sent();\n rate = image.width / image.height;\n maxHeight = Math.floor(Math.sqrt((this.dotSize * this.dotSize * maxHiddenDots) / rate));\n if (rate > 1) {\n logoHeight = maxHeight;\n logoInnerHeight = maxHeight - 2 * borderWidth;\n logoInnerWidth = Math.floor(logoInnerHeight * rate);\n logoWidth = logoInnerWidth + borderWidth * 2;\n }\n else {\n logoWidth = Math.floor(maxHeight * rate);\n logoInnerWidth = logoWidth - borderWidth * 2;\n logoInnerHeight = Math.floor(logoInnerWidth / rate);\n logoHeight = logoInnerHeight + 2 * borderWidth;\n }\n xStart = (this.size - Math.ceil(logoWidth / this.dotSize)) / 2;\n xEnd = this.size - xStart - 1;\n yStart = (this.size - Math.ceil(logoHeight / this.dotSize)) / 2;\n yEnd = this.size - yStart - 1;\n this.inLogoRange = function (i, j) {\n return i >= xStart && i <= xEnd && j >= yStart && j <= yEnd;\n };\n return [2 /*return*/, function () {\n var cx = canvas.width / 2;\n var cy = canvas.height / 2;\n context.translate(cx, cy);\n canvasRoundRect(context)(-logoWidth / 2, -logoHeight / 2, logoWidth, logoHeight, borderRadius);\n this.context.fillStyle = bgColor;\n this.context.fill();\n // 使用image绘制可以避免某些跨域情况\n // Use image drawing to avoid some cross-domain situations\n var drawLogoWithImage = function () {\n context.drawImage(image, -logoInnerWidth / 2, -logoInnerHeight / 2, logoInnerWidth, logoInnerHeight);\n };\n // 使用canvas绘制以获得更多的功能\n // Use canvas to draw more features, such as borderRadius\n var drawLogoWithCanvas = function () {\n var canvasImage = document.createElement('canvas');\n canvasImage.width = logoInnerWidth;\n canvasImage.height = logoInnerHeight;\n canvasImage\n .getContext('2d')\n .drawImage(image, 0, 0, logoInnerWidth, logoInnerHeight);\n canvasRoundRect(context)(0, 0, logoInnerWidth, logoInnerHeight, logoRadius);\n // @ts-ignore\n context.fillStyle = context.createPattern(canvasImage, 'no-repeat');\n context.fill();\n };\n if (logoRadius) {\n context.translate(-logoInnerWidth / 2, -logoInnerHeight / 2);\n drawLogoWithCanvas();\n context.translate(-cx + logoInnerWidth / 2, -cy + logoInnerHeight / 2);\n }\n else {\n drawLogoWithImage();\n context.translate(-cx, -cy);\n }\n }];\n }\n });\n });\n };\n /**\n * 目標坐標是否為黑點?\n * Coordinate is dark dot ? 0 or 1\n */\n QRCanvas.prototype.isDark = function (x, y) {\n return this.qrcodeArray[x + y * this.size] === 1;\n };\n QRCanvas.prototype.isDisabled = function (x, y) {\n return this.qrcodeArray[x + y * this.size] === 2;\n };\n QRCanvas.prototype.setDisabled = function (x, y) {\n return this.qrcodeArray[x + y * this.size] = 2;\n };\n /**\n * 畫背景\n */\n QRCanvas.prototype.drawBackground = function () {\n var _a;\n var canvasContext = this.context;\n var nodeQrCodeOptions = this.options.nodeQrCodeOptions;\n var light = ((_a = nodeQrCodeOptions === null || nodeQrCodeOptions === void 0 ? void 0 : nodeQrCodeOptions.color) === null || _a === void 0 ? void 0 : _a.light) ||\n defaultOptions.nodeQrCodeOptions.color.light;\n if (canvasContext) {\n canvasContext.fillStyle = light;\n canvasContext.fillRect(0, 0, this.canvas.width, this.canvas.height);\n }\n };\n /**\n * 画点\n */\n QRCanvas.prototype.drawDots = function () {\n var _this = this;\n var _a, _b, _c, _d;\n var canvasContext = this.context;\n if (canvasContext) {\n var count_1 = this.size;\n /**每个像素点宽度,整數 */\n var dotSize = this.dotSize;\n /**二维码起始位置x */\n var xBeginning = this.offset;\n /**二维码起始位置y */\n var yBeginning = this.offset;\n /**排除定位点 */\n var filterDots_1 = function (i, j) {\n var _a, _b, _c, _d, _e, _f;\n // 排除定位点外框\n if (((_a = squareMask[i]) === null || _a === void 0 ? void 0 : _a[j]) ||\n ((_b = squareMask[i - count_1 + 7]) === null || _b === void 0 ? void 0 : _b[j]) ||\n ((_c = squareMask[i]) === null || _c === void 0 ? void 0 : _c[j - count_1 + 7])) {\n return false;\n }\n // 排除定位点\n if (((_d = dotMask[i]) === null || _d === void 0 ? void 0 : _d[j]) ||\n ((_e = dotMask[i - count_1 + 7]) === null || _e === void 0 ? void 0 : _e[j]) ||\n ((_f = dotMask[i]) === null || _f === void 0 ? void 0 : _f[j - count_1 + 7])) {\n return false;\n }\n if (_this.inLogoRange && _this.inLogoRange(i, j))\n return false;\n return true;\n };\n var dot = new QRDot({\n context: this.context,\n type: ((_a = this.options.dotsOptions) === null || _a === void 0 ? void 0 : _a.type) || defaultOptions.dotsOptions.type,\n dotSize: dotSize\n });\n canvasContext.fillStyle = canvasContext.strokeStyle =\n ((_b = this.options.dotsOptions) === null || _b === void 0 ? void 0 : _b.color) ||\n ((_d = (_c = this.options.nodeQrCodeOptions) === null || _c === void 0 ? void 0 : _c.color) === null || _d === void 0 ? void 0 : _d.dark) ||\n defaultOptions.dotsOptions.color;\n var _loop_1 = function (i) {\n var _loop_2 = function (j) {\n if (!filterDots_1(i, j)) {\n return \"continue\";\n }\n if (!this_1.isDark(i, j)) {\n return \"continue\";\n }\n dot.draw(xBeginning + i * dotSize, yBeginning + j * dotSize, function (xOffset, yOffset) {\n if (i + xOffset < 0 ||\n j + yOffset < 0 ||\n i + xOffset >= count_1 ||\n j + yOffset >= count_1)\n return null;\n if (!filterDots_1(i + xOffset, j + yOffset))\n return null;\n return _this.isDark(i + xOffset, j + yOffset);\n }, this_1, i, j);\n };\n for (var j = 0; j < count_1; j++) {\n _loop_2(j);\n }\n };\n var this_1 = this;\n for (var i = 0; i < count_1; i++) {\n _loop_1(i);\n }\n canvasContext.fill();\n }\n };\n /**\n * 绘制角落定位图案\n */\n QRCanvas.prototype.drawCorners = function () {\n var _this = this;\n var canvasContext = this.context;\n if (canvasContext) {\n var nodeQrCodeOptions_1 = this.options.nodeQrCodeOptions;\n var margin = (nodeQrCodeOptions_1 === null || nodeQrCodeOptions_1 === void 0 ? void 0 : nodeQrCodeOptions_1.margin) || defaultOptions.nodeQrCodeOptions.margin;\n var count_2 = this.size;\n var width = this.options.width || defaultOptions.width;\n /**二维码除去margin的实际宽度 */\n var minSize = width - margin * 2;\n /**每个像素点宽度 */\n var dotSize_1 = Math.floor(minSize / count_2);\n /**二维码起始位置x */\n var xBeginning_1 = Math.floor((width - count_2 * dotSize_1) / 2);\n /**二维码起始位置y */\n var yBeginning_1 = Math.floor((width - count_2 * dotSize_1) / 2);\n [\n [0, 0],\n [1, 0],\n [0, 1]\n ].forEach(function (_a) {\n var _b;\n var _c = __read(_a, 2), column = _c[0], row = _c[1];\n var x = xBeginning_1 + column * dotSize_1 * (count_2 - 7);\n var y = yBeginning_1 + row * dotSize_1 * (count_2 - 7);\n var cornersOptions = _this.options.cornersOptions;\n var corner = new QRCorner(_this.context, cornersOptions.type || defaultOptions.cornersOptions.type, cornersOptions.color ||\n ((_b = nodeQrCodeOptions_1 === null || nodeQrCodeOptions_1 === void 0 ? void 0 : nodeQrCodeOptions_1.color) === null || _b === void 0 ? void 0 : _b.dark) ||\n defaultOptions.cornersOptions.color);\n corner.draw({\n x: x,\n y: y,\n dotSize: _this.dotSize,\n radius: cornersOptions.radius\n });\n });\n }\n };\n return QRCanvas;\n}());\n\nvar version = \"1.1.0\";\n\nvar QrCodeWithLogo = /** @class */ (function () {\n function QrCodeWithLogo(options) {\n var _this = this;\n this.ifCanvasDrawed = false;\n this.ifImageCreated = false;\n this.drawImagePromiseResolve = [];\n this.drawImagePromiseReject = [];\n this.drawCanvasPromiseResolve = [];\n this.drawCanvasPromiseReject = [];\n this.defaultOption = {\n canvas: undefined,\n image: undefined,\n content: '',\n width: defaultOptions.width,\n download: defaultOptions.download,\n downloadName: defaultOptions.downloadName,\n nodeQrCodeOptions: {},\n cornersOptions: {},\n dotsOptions: {}\n };\n try {\n this.options = Object.assign(this.defaultOption, options);\n if (!this.options.canvas)\n this.options.canvas = document.createElement('canvas');\n if (!this.options.image)\n this.options.image = document.createElement('img');\n this._toCanvas()\n .then(function () {\n return _this._toImage();\n })\n .catch(function (error) {\n if ((options === null || options === void 0 ? void 0 : options.onError) && isFunction(options.onError)) {\n options.onError(error);\n }\n _this.batchRunFunction('drawCanvasPromiseReject', error);\n _this.batchRunFunction('drawImagePromiseReject', error);\n });\n }\n catch (error) {\n if ((options === null || options === void 0 ? void 0 : options.onError) && isFunction(options.onError)) {\n options.onError(error);\n }\n this.batchRunFunction('drawCanvasPromiseReject', error);\n this.batchRunFunction('drawImagePromiseReject', error);\n }\n }\n QrCodeWithLogo.prototype.drawImagePromise = function () {\n var _this = this;\n if (this.ifImageCreated)\n return Promise.resolve();\n return new Promise(function (resolve, reject) {\n _this.drawImagePromiseResolve.push(resolve);\n _this.drawImagePromiseReject.push(reject);\n });\n };\n QrCodeWithLogo.prototype.drawCanvasPromise = function () {\n var _this = this;\n if (this.ifCanvasDrawed)\n return Promise.resolve();\n return new Promise(function (resolve, reject) {\n _this.drawCanvasPromiseResolve.push(resolve);\n _this.drawCanvasPromiseReject.push(reject);\n });\n };\n /**\n * Deprecated!\n */\n QrCodeWithLogo.prototype.toCanvas = function () {\n throw new Error('toCanvas has been Deprecated!');\n };\n /**\n * Deprecated!\n */\n QrCodeWithLogo.prototype.toImage = function () {\n throw new Error('toImage has been Deprecated!');\n };\n /**\n * draw canvas\n * @returns\n */\n QrCodeWithLogo.prototype._toCanvas = function () {\n var _this = this;\n var qrCanvas = new QRCanvas(this.options);\n return qrCanvas.init().then(function () {\n _this.ifCanvasDrawed = true;\n _this.batchRunFunction('drawCanvasPromiseResolve');\n });\n };\n /**\n * Get image base64 and set image's src attribute .\n * @returns\n */\n QrCodeWithLogo.prototype._toImage = function () {\n return __awaiter(this, void 0, Promise, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, toImage(this.options).then(function () {\n _this.ifImageCreated = true;\n _this.batchRunFunction('drawImagePromiseResolve');\n })];\n });\n });\n };\n /**\n * 批量执行 resolve reject\n * @param name\n * @param err\n */\n QrCodeWithLogo.prototype.batchRunFunction = function (name, err) {\n if (err === void 0) { err = null; }\n var array = this[name];\n if (Array.isArray(array)) {\n array.forEach(function (fn) {\n if (isFunction(fn))\n fn(err);\n });\n this[name].length = 0;\n }\n };\n QrCodeWithLogo.prototype.downloadImage = function () {\n return __awaiter(this, arguments, void 0, function (name) {\n if (name === void 0) { name = defaultOptions.downloadName; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.drawImagePromise()];\n case 1:\n _a.sent();\n return [2 /*return*/, saveImage(this.options.image, name)];\n }\n });\n });\n };\n QrCodeWithLogo.prototype.getImage = function () {\n return __awaiter(this, void 0, Promise, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.drawImagePromise()];\n case 1:\n _a.sent();\n return [2 /*return*/, this.options.image];\n }\n });\n });\n };\n QrCodeWithLogo.prototype.getCanvas = function () {\n return __awaiter(this, void 0, Promise, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.drawCanvasPromise()];\n case 1:\n _a.sent();\n return [2 /*return*/, this.options.canvas];\n }\n });\n });\n };\n QrCodeWithLogo.version = version;\n return QrCodeWithLogo;\n}());\n\nexport { QrCodeWithLogo as default };\n","@import '../../themes/capsule.globals';\n\n:host {\n --qr-color: var(--cpsl-color-qr-fill);\n --qr-background-color: var(--cpsl-color-qr-background);\n --qr-border-color: var(--cpsl-color-qr-border);\n --qr-border-radius: var(--cpsl-border-radius-qr-code);\n --qr-border-width: 0px;\n --qr-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.06);\n --qr-padding-top: 12px;\n --qr-padding-end: 12px;\n --qr-padding-bottom: 12px;\n --qr-padding-start: 12px;\n\n display: inline-block;\n}\n\n.qr-container {\n @include padding(var(--qr-padding-top), var(--qr-padding-end), var(--qr-padding-bottom), var(--qr-padding-start));\n\n box-sizing: border-box;\n\n color: var(--qr-color);\n\n border-style: solid;\n border-width: var(--qr-border-width);\n border-color: var(--qr-border-color);\n border-radius: var(--qr-border-radius);\n\n background: var(--qr-background-color);\n\n box-shadow: var(--qr-box-shadow);\n}\n\n.qr-code {\n width: 100%;\n height: 100%;\n}\n","import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport QrCodeWithLogo from 'qrcode-with-logos';\n\n@Component({\n tag: 'cpsl-qr-code',\n styleUrl: 'cpsl-qr-code.scss',\n shadow: true,\n})\nexport class CpslQrCode {\n @Element() el!: HTMLCpslQrCodeElement;\n\n /**\n * URL for the QR code to link to.\n */\n @Prop() url: string;\n\n /**\n * Source for the center image of the QR code.\n */\n @Prop() imageSrc?: string;\n\n /**\n * Size of the QR code in pixels.\n * Default is 250.\n */\n @Prop() size?: number = 286;\n\n componentDidLoad() {\n new QrCodeWithLogo({\n content: this.url,\n width: 1000,\n image: this.imgEl,\n logo: this.imageSrc\n ? {\n src: this.imageSrc,\n borderRadius: 16,\n }\n : '',\n dotsOptions: {\n type: 'dot',\n },\n cornersOptions: {\n type: 'rounded',\n radius: {\n inner: 8,\n outer: 32,\n },\n },\n nodeQrCodeOptions: {\n margin: 0,\n errorCorrectionLevel: 'M',\n },\n });\n }\n\n private get imgEl(): HTMLImageElement {\n return this.el.shadowRoot.getElementById('qr-code') as HTMLImageElement;\n }\n\n render() {\n return (\n <Host>\n <div id=\"qr-container\" class=\"qr-container\" style={{ width: `${this.size}px`, height: `${this.size}px` }}>\n <img id=\"qr-code\" class=\"qr-code\" />\n </div>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n // CONTAINER\n --container-height: 20px;\n --container-width: 20px;\n --container-border-radius: var(--cpsl-border-radius-radio);\n --container-border-width-default: 2px;\n --container-border-width-checked: 5px;\n --container-background-color-default: var(--cpsl-color-radio-surface-default);\n --container-border-color-default: var(--cpsl-color-radio-border-default);\n --container-background-color-checked: var(--cpsl-color-radio-surface-checked);\n --container-border-color-checked: var(--cpsl-color-radio-border-checked);\n\n display: block;\n position: relative;\n\n height: var(--container-height);\n width: var(--container-width);\n cursor: pointer;\n}\n\ninput {\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0px;\n opacity: 0;\n}\n\nspan.container {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: var(--container-border-radius);\n border: var(--container-border-width-default) solid;\n background: var(--container-background-color-default);\n border-color: var(--container-border-color-default);\n\n transition: all 0.15s ease-in-out;\n\n &.checked {\n background: var(--container-background-color-checked);\n border-color: var(--container-border-color-checked);\n border-width: var(--container-border-width-checked);\n }\n}\n","import { Component, EventEmitter, Host, Prop, Event, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-radio',\n styleUrl: 'cpsl-radio.scss',\n shadow: true,\n})\nexport class CpslRadio {\n /**\n * Whether or not the radio is checked.\n */\n @Prop() checked: boolean;\n\n /**\n * Emitted when the radio state changes.\n */\n @Event() cpslRadioChanged!: EventEmitter<boolean>;\n\n private handleRadioClick = () => {\n if (!this.checked) {\n this.cpslRadioChanged.emit(!this.checked);\n }\n };\n\n render() {\n return (\n <Host>\n <input type=\"radio\" checked={this.checked} />\n <span onClick={this.handleRadioClick} class={{ container: true, checked: this.checked }} />\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --container-box-shadow: none;\n --container-box-shadow-color: var(--cpsl-color-select-border-placeholder);\n --container-border-color: var(--cpsl-color-select-border-active);\n --container-border-error-color: var(--cpsl-color-select-border-error);\n --container-background-color: var(--cpsl-color-select-surface-default);\n --container-background-color-disabled: var(--cpsl-color-select-surface-disabled);\n --container-border-width: 1px;\n --container-border-radius: var(--cpsl-border-radius-select);\n --container-padding-top: 0px;\n --container-padding-bottom: 0px;\n --container-padding-end: 12px;\n --container-padding-start: 12px;\n --container-height: 48px;\n --container-gap: 8px;\n\n --dropdown-margin-top: 4px;\n --dropdown-border-width: 1px;\n --dropdown-border-radius: var(--cpsl-border-radius-select);\n --dropdown-border-color: var(--cpsl-color-select-dropdown-border);\n\n --optional-label-color: var(--cpsl-color-text-secondary);\n --label-color: var(--cpsl-color-text-primary);\n --label-font-size: var(--cpsl-font-size-body-s);\n --label-margin-bottom: 0px;\n\n --helper-text-color: var(--cpsl-color-text-secondary);\n --helper-text-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-color: var(--cpsl-color-text-secondary);\n --helper-text-icon-error-color: var(--cpsl-color-text-error);\n --helper-text-icon-size: 16px;\n --helper-text-font-size: var(--cpsl-font-size-body-xs);\n --helper-text-margin-top: 0px;\n\n --icon-height: 24px;\n --icon-width: 24px;\n\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n font-family: $font-family-base;\n}\n\ninput {\n box-sizing: border-box;\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0px;\n opacity: 0;\n top: 0;\n left: 0;\n z-index: -1;\n cursor: pointer;\n\n &.disabled {\n cursor: default;\n }\n}\n\n:host(:not(.has-value)) {\n --container-border-color: var(--cpsl-color-select-border-placeholder);\n --select-color: var(--cpsl-color-text-secondary);\n}\n\n:host(.disabled) {\n --container-background-color: var(--container-background-color-disabled);\n --select-background-color: var(--select-background-color-disabled);\n --select-color: var(--cpsl-color-text-disabled);\n}\n\n:host(.focused) {\n --container-box-shadow: 0px 0px 0px 2px var(--container-box-shadow-color);\n --container-border-color: var(--cpsl-color-select-border-active);\n --container-background-color: var(--cpsl-color-select-surface-default);\n}\n\n.select-container {\n @include padding(var(--container-padding-top), var(--container-padding-end), var(--container-padding-bottom), var(--container-padding-start));\n\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n box-sizing: border-box;\n height: var(--container-height);\n gap: var(--container-gap);\n cursor: pointer;\n\n border-style: solid;\n border-width: var(--container-border-width);\n border-color: var(--container-border-color);\n border-radius: var(--container-border-radius);\n background: var(--container-background-color);\n\n box-shadow: var(--container-box-shadow);\n}\n\n.error-container {\n border-color: var(--container-border-error-color);\n}\n\n.label {\n display: inline-block;\n color: var(--label-color);\n font-size: var(--label-font-size);\n font-weight: 500;\n\n margin-bottom: var(--label-margin-bottom);\n}\n\n.optional-label {\n display: inline-block;\n color: var(--optional-label-color);\n // TODO: this will use a typography size once typography changes\n font-size: var(--label-font-size);\n font-weight: 500;\n}\n\n.helper-text-container {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--helper-text-color);\n font-size: var(--helper-text-font-size);\n font-weight: 500;\n\n margin-top: var(--helper-text-margin-top);\n\n cpsl-icon {\n --height: var(--helper-text-icon-size);\n --width: var(--helper-text-icon-size);\n --icon-color: var(--helper-text-icon-color);\n }\n}\n\n.error-text {\n color: var(--helper-text-error-color);\n\n cpsl-icon {\n --icon-color: var(--helper-text-icon-error-color);\n }\n}\n\n.selected-container-content {\n flex: 1;\n\n &.hidden {\n display: none;\n }\n}\n\n.chevron {\n transition: transform 0.3s ease;\n transform: rotate(180deg);\n --icon-color: var(--cpsl-color-text-disabled);\n --height: var(--icon-height);\n --width: var(--icon-width);\n\n &.open {\n transform: rotate(0deg);\n --icon-color: var(--cpsl-color-text-primary);\n }\n\n &.has-value {\n --icon-color: var(--cpsl-color-text-primary);\n }\n}\n\n.selected-text {\n color: var(--cpsl-color-text-primary);\n\n &.placeholder {\n color: var(--cpsl-color-text-disabled);\n }\n}\n\n.dropdown {\n margin-top: var(--dropdown-margin-top);\n\n border-style: solid;\n border-width: var(--dropdown-border-width);\n border-color: var(--dropdown-border-color);\n border-radius: var(--dropdown-border-radius);\n overflow: hidden;\n\n ::slotted(*:last-child) {\n --container-border-width: 0px;\n }\n}\n\n.dropdown-inner {\n overflow: auto;\n\n scrollbar-width: thin;\n\n ::slotted(cpsl-input) {\n padding: 8px;\n }\n}\n\n.search-container {\n position: sticky;\n top: 0px;\n padding: 8px;\n\n background-color: var(--cpsl-color-select-surface-default);\n}\n","import { Component, Host, Element, h, Prop, State, EventEmitter, Event, Watch, Listen } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-select',\n styleUrl: 'cpsl-select.scss',\n shadow: true,\n})\nexport class CpslSelect {\n @Element() el!: HTMLCpslSelectElement;\n private popoverEl!: HTMLCpslPopoverElement;\n private inputId = `cpsl-select-${inputIds++}`;\n\n @State() anchorEl!: HTMLElement;\n @State() hasFocus = false;\n @State() popoverOpen = false;\n @State() hasSelectedItem = false;\n\n /**\n * ID of element to anchor popover to.\n */\n @Prop() anchorElId?: string;\n\n /**\n * If `true` the popover container will use the width of the content, else it will be set to the width of the trigger.\n * Default is `false`\n */\n @Prop() autoWidth?: boolean = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * Set the max height of the dropdown.\n */\n @Prop() dropdownMaxHeight?: number;\n\n /**\n * Error text to show below the input. If this is provided the input will enter an error state.\n */\n @Prop() errorText?: string;\n\n /**\n * Format value for display when selected.\n */\n @Prop() formatValue?: (value: string) => string;\n\n /**\n * Helper text to show below the input. If `\"errorText\"` is provided that will take precedence.\n */\n @Prop() helperText?: string;\n\n /**\n * ID of the element, must be unique for the popover trigger.\n */\n\n @Prop() id: string = `${this.inputId}-trigger`;\n\n /**\n * The label for the input.\n */\n @Prop() label?: string;\n\n /**\n * Placeholder to display if `selectedValue` is empty.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * Value of the selected item.\n */\n @Prop() selectedValue?: string;\n\n /**\n * Will show the formatted selected item (passed in the `selected-item` slot) in the select rather than the item value.\n */\n @Prop() showFormattedSelectedItem?: boolean;\n\n /**\n * If `true`, the label will display an \"optional\" tag.\n */\n @Prop() showOptionalLabel = false;\n\n /**\n * If `true`, the dropdown will contain a search field.\n */\n @Prop() showSearch = false;\n\n /**\n * Placeholder for the search field.\n */\n @Prop() searchPlaceholder?: string;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() cpslBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() cpslFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() cpslSelectValueChange!: EventEmitter<string>;\n\n /**\n * Emitted when the search value changes.\n */\n @Event() cpslSearchChange!: EventEmitter<string>;\n\n @Watch('selectedValue')\n onValueChange() {\n this.popoverEl.closePopover();\n }\n\n @Watch('selectedValue')\n handleValueChange() {\n this.selectItem();\n }\n\n @Listen('cpslSelectItemClick')\n selectItemClickHandler(event: CustomEvent<string>) {\n this.cpslSelectValueChange.emit(event.detail);\n }\n\n @Listen('cpslOpen')\n onPopoverOpen() {\n this.popoverOpen = true;\n }\n\n @Listen('cpslClose')\n onPopoverClose() {\n this.popoverOpen = false;\n }\n\n componentDidLoad() {\n this.popoverEl = this.el.shadowRoot.querySelector(`cpsl-popover`) as HTMLCpslPopoverElement;\n this.anchorEl = this.anchorElId ? document.getElementById(this.anchorElId) : this.el.shadowRoot.getElementById('select-container');\n\n this.selectItem();\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n this.popoverEl.closePopover();\n\n this.cpslBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n\n this.cpslFocus.emit(ev);\n };\n\n private handleEnterPress = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter') {\n ev.preventDefault();\n this.el.dispatchEvent(new MouseEvent('mousedown'));\n }\n };\n\n private selectItem = () => {\n const items = Array.from(this.el.querySelectorAll('cpsl-select-item')) as HTMLCpslSelectItemElement[];\n\n items.forEach(item => {\n if (item.value === this.selectedValue) {\n item.setAttribute('selected', 'true');\n this.hasSelectedItem = true;\n } else {\n item.setAttribute('selected', 'false');\n }\n });\n\n if (!this.selectedValue) {\n this.hasSelectedItem = false;\n }\n };\n\n private handleClickOutside = (event: MouseEvent) => {\n if (this.hasFocus && !this.el.contains(event.target as Node)) {\n this.hasFocus = false;\n window.removeEventListener('click', this.handleClickOutside);\n }\n };\n\n private handleClick = () => {\n if (!this.disabled) {\n this.hasFocus = true;\n window.addEventListener('click', this.handleClickOutside);\n }\n };\n\n render() {\n return (\n <Host id={this.id} class={{ 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.selectedValue) }}>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n {this.required ? '*' : ' '}\n {!this.required && this.showOptionalLabel ? <span class=\"optional-label\">(optional)</span> : ''}\n </label>\n )}\n <div id=\"select-container\" class={{ 'select-container': true, 'error-container': Boolean(this.errorText) }} onMouseDown={this.handleClick}>\n {this.hasSelectedItem && this.showFormattedSelectedItem && <slot name=\"selected-item\"></slot>}\n <div class={{ 'selected-container-content': true, 'hidden': this.hasSelectedItem && this.showFormattedSelectedItem }} id=\"selected-container-content\" style={{}}>\n {(!this.hasSelectedItem || !this.showFormattedSelectedItem) && (\n <cpsl-text class={{ 'selected-text': true, 'placeholder': !this.selectedValue }}>\n {!this.selectedValue ? (this.placeholder ?? 'Select') : (this.formatValue?.(this.selectedValue) ?? this.selectedValue)}\n </cpsl-text>\n )}\n </div>\n <cpsl-icon class={{ 'chevron': true, 'open': this.popoverOpen, 'has-value': Boolean(this.selectedValue) }} icon=\"chevronUp\" />\n <input\n id={this.inputId}\n disabled={this.disabled}\n class={{ disabled: this.disabled }}\n value={this.selectedValue}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyPress={this.handleEnterPress}\n inputmode=\"none\"\n />\n </div>\n {(this.errorText || this.helperText) && (\n <div class={{ 'helper-text-container': true, 'error-text': Boolean(this.errorText) }}>\n <span>{this.errorText ?? this.helperText}</span>\n </div>\n )}\n <cpsl-popover part=\"popover\" autoWidth={this.autoWidth} trigger={this.id} preventBlur={this.hasFocus} disabled={this.disabled} anchorEl={this.anchorEl}>\n <div part=\"dropdown\" class=\"dropdown\">\n {this.showSearch && (\n <div class=\"search-container\">\n <cpsl-input\n onClick={e => e.stopPropagation()}\n placeholder={this.searchPlaceholder ?? 'Search'}\n value=\"\"\n onCpslInput={e => {\n e.stopPropagation();\n this.cpslSearchChange.emit(e.detail.value);\n }}\n />\n </div>\n )}\n <div class=\"dropdown-inner\" style={{ maxHeight: `${this.dropdownMaxHeight}px` }}>\n <slot name=\"items\"></slot>\n </div>\n </div>\n </cpsl-popover>\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n","@import '../../themes/capsule.globals';\n\n:host {\n --outer-container-padding-start: 8px;\n --outer-container-padding-end: 8px;\n --outer-container-padding-top: 8px;\n --outer-container-padding-bottom: 8px;\n\n --container-background-color: var(--cpsl-color-select-surface-default);\n --container-hover-background-color: var(--cpsl-color-select-surface-hover);\n --container-border-radius: calc(var(--cpsl-border-radius-select) - 4px);\n --container-padding-start: 8px;\n --container-padding-end: 8px;\n --container-padding-top: 8px;\n --container-padding-bottom: 8px;\n\n display: block;\n font-family: $font-family-base;\n cursor: pointer;\n}\n\n.inner-container {\n @include padding(var(--container-padding-top), var(--container-padding-end), var(--container-padding-bottom), var(--container-padding-start));\n\n background-color: var(--container-background-color);\n\n border-radius: var(--container-border-radius);\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.outer-container {\n @include padding(var(--outer-container-padding-top), var(--outer-container-padding-end), var(--outer-container-padding-bottom), var(--outer-container-padding-start));\n\n background-color: var(--container-background-color);\n\n &:hover {\n & > .inner-container {\n background-color: var(--container-hover-background-color);\n }\n }\n}\n\n.selected {\n background-color: var(--container-hover-background-color);\n}\n\n:host(.in-select-box) {\n --container-background-color: transparent;\n --container-hover-background-color: transparent;\n --container-border-width: 0px;\n --container-padding-start: 0px;\n --container-padding-end: 0px;\n --container-padding-top: 0px;\n --container-padding-bottom: 0px;\n flex: 1;\n height: 100%;\n}\n","import { Component, Host, Prop, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-select-item',\n styleUrl: 'cpsl-select-item.scss',\n shadow: true,\n})\nexport class CpslSelectItem {\n /**\n * Whether the item is selected or not.\n */\n @Prop() selected?: boolean;\n\n /**\n * Value of the item.\n */\n @Prop() value: string;\n\n /**\n * Called when item is clicked.\n * @internal\n */\n @Event() cpslSelectItemClick: EventEmitter<string>;\n\n private handleItemClick = () => {\n this.cpslSelectItemClick.emit(this.value);\n };\n\n render() {\n return (\n <Host>\n <div part=\"outer-container\" class=\"outer-container\" onClick={this.handleItemClick}>\n <div part=\"inner-container\" class={{ 'inner-container': true, 'selected': this.selected }}>\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n /* SLIDER CONTAINER VARS */\n --slider-container-font-size: 14px;\n --slider-container-height: 44px;\n --slider-container-border-width: 1px;\n --slider-container-box-shadow: 0px 0px 4px 0px var(--cpsl-color-alpha-black-10) inset;\n\n --slider-container-start-background-color: var(--cpsl-color-slideButton-slider-container-start-background);\n --slider-container-end-background-color: var(--cpsl-color-slideButton-slider-container-end-background);\n --slider-container-start-border-color: var(--cpsl-color-slideButton-slider-container-start-border);\n --slider-container-end-border-color: var(--cpsl-color-slideButton-slider-container-end-border);\n\n /* SLIDER VARS */\n --slider-border-width: 1px;\n --slider-box-shadow: 3px 0px 4px 0px var(--cpsl-color-alpha-black-16);\n\n --slider-border-color: var(--cpsl-color-slideButton-slider-border);\n --slider-background-color: var(--cpsl-color-slideButton-slider-background);\n --slider-color: var(--cpsl-color-slideButton-slider-text);\n\n /* START TEXT VARS */\n --start-text-color: var(--cpsl-color-slideButton-start-text);\n\n /* END TEXT VARS */\n --end-text-color: var(--cpsl-color-slideButton-end-text);\n\n font-family: $font-family-base;\n display: block;\n}\n\n.slider-container {\n overflow: hidden;\n position: relative;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n\n font-size: var(--slider-container-font-size);\n font-weight: 500;\n\n height: var(--slider-container-height);\n\n border-width: var(--slider-container-border-width);\n border-style: solid;\n border-radius: calc(var(--slider-container-height) / 2);\n\n box-shadow: var(--slider-container-box-shadow);\n}\n\n.slider-container-background {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.start-slider-container-background {\n background: var(--slider-container-start-background-color);\n border-color: var(--slider-container-start-border-color);\n opacity: 100%;\n}\n\n.end-slider-container-background {\n background: var(--slider-container-end-background-color);\n border-color: var(--slider-container-end-border-color);\n opacity: 0%;\n}\n\n.start-text {\n user-select: none;\n color: var(--start-text-color);\n position: absolute;\n text-align: center;\n\n opacity: 100%;\n\n // Make text the width of the container minus the button, gap and right padding\n width: calc(100% - var(--slider-container-height) - 8px - 16px);\n left: calc(var(--slider-container-height) - 4px + 8px);\n\n &.disabled {\n left: 0;\n width: 100%;\n }\n}\n\n.end-text {\n user-select: none;\n color: var(--end-text-color);\n position: absolute;\n text-align: center;\n\n opacity: 0%;\n\n // Make text the width of the container minus the button, gap and left padding\n width: calc(100% - var(--slider-container-height) - 8px);\n left: 16px;\n}\n\n.icon {\n position: absolute;\n}\n\n.start-icon {\n opacity: 100%;\n}\n\n.end-icon {\n opacity: 0%;\n}\n\n.slider {\n left: 1px;\n cursor: pointer;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n\n position: absolute;\n z-index: 10;\n\n height: calc(var(--slider-container-height) - 4px);\n width: calc(var(--slider-container-height) - 4px);\n\n color: var(--slider-color);\n background: var(--slider-background-color);\n\n border-width: var(--slider-border-width);\n border-style: solid;\n border-color: var(--slider-border-color);\n border-radius: 100%;\n\n box-shadow: var(--slider-box-shadow);\n\n cpsl-icon {\n --icon-color: var(--slider-color);\n }\n\n &.disabled {\n visibility: hidden;\n }\n}\n","import { Component, Host, Prop, h, Element, EventEmitter, Event } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-slide-button',\n styleUrl: 'cpsl-slide-button.scss',\n shadow: true,\n})\nexport class CpslSlideButton {\n @Element() el!: HTMLCpslSlideButtonElement;\n\n /**\n * Whether or not the component is disabled. If true, the component will display the `startText`.\n */\n @Prop() disabled: boolean;\n\n /**\n * The name of the ending icon to show.\n */\n @Prop() endIcon: IconType;\n\n /**\n * The ending text.\n */\n @Prop() endText: string;\n\n /**\n * The name of the starting icon to show.\n */\n @Prop() startIcon: IconType;\n\n /**\n * The starting text.\n */\n @Prop() startText: string;\n\n /**\n * The `cpslComplete` event is fired when the slider is at the end.\n */\n @Event() cpslComplete!: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.dragElement(this.el.shadowRoot.getElementById('slider'));\n }\n\n private dragElement(el: HTMLElement) {\n const pointerDown = (e: PointerEvent) => {\n pos3 = e.clientX;\n\n switch (e.pointerType) {\n case 'mouse':\n el.onmousedown = dragMouseDown;\n break;\n default:\n el.ontouchstart = dragTouchDown;\n }\n };\n\n const dragMouseDown = (e: MouseEvent) => {\n e.preventDefault();\n // get the mouse cursor position at startup:\n pos3 = e.clientX;\n document.onmouseup = closeDragElement;\n // call a function whenever the cursor moves:\n document.onmousemove = elementMouseDrag;\n };\n\n const dragTouchDown = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // get the mouse cursor position at startup:\n pos3 = touchLocation.clientX;\n document.ontouchend = closeDragElement;\n // call a function whenever the cursor moves:\n document.ontouchmove = elementTouchDrag;\n };\n\n const elementMouseDrag = (e: MouseEvent) => {\n e.preventDefault();\n // calculate the new cursor position:\n pos1 = pos3 - e.clientX;\n pos3 = e.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const elementTouchDrag = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // calculate the new cursor position:\n pos1 = pos3 - touchLocation.clientX;\n pos3 = touchLocation.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const finishElementDrag = (pos: number) => {\n const newPos = el.offsetLeft - pos;\n if (newPos >= minX && newPos <= maxX) {\n const newPosPercent = Math.max(Math.min(Math.round((newPos / maxX) * 100) / 100, 100), 0);\n\n startTextEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endTextEl.style.opacity = `${newPosPercent * 100}%`;\n\n startIconEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endIconEl.style.opacity = `${newPosPercent * 100}%`;\n\n endBackgroundEl.style.opacity = `${newPosPercent * 100}%`;\n\n el.style.left = `${newPos}px`;\n }\n };\n\n const closeDragElement = () => {\n if (el.offsetLeft + sliderHeight >= containerWidth - sliderHeight / 2) {\n el.style.left = `${maxX}px`;\n startTextEl.style.opacity = '0%';\n endTextEl.style.opacity = '100%';\n startIconEl.style.opacity = '0%';\n endIconEl.style.opacity = '100%';\n endBackgroundEl.style.opacity = '100%';\n this.cpslComplete.emit(true);\n } else {\n el.style.left = `${minX}px`;\n startTextEl.style.opacity = '100%';\n endTextEl.style.opacity = '0%';\n startIconEl.style.opacity = '100%';\n endIconEl.style.opacity = '0%';\n endBackgroundEl.style.opacity = '0%';\n }\n // stop moving when mouse button is released:\n document.onmouseup = null;\n document.onmousemove = null;\n document.ontouchend = null;\n document.ontouchmove = null;\n };\n\n const startIconEl = this.startIconEl;\n const endIconEl = this.endIconEl;\n const startTextEl = this.startTextEl;\n const endTextEl = this.endTextEl;\n const endBackgroundEl = this.endBackgroundEl;\n\n const sliderContainerEl = this.sliderContainerEl;\n const containerWidth = sliderContainerEl.clientWidth;\n\n const sliderHeight = el.getBoundingClientRect().height;\n\n // Offset min by 1 for 1px left padding\n const minX = 1;\n // Offset max by the slider width and 1px for padding\n const maxX = containerWidth - sliderHeight - 1;\n\n let pos1 = 0,\n pos3 = 0;\n\n el.onpointerdown = pointerDown;\n }\n\n private get sliderContainerEl() {\n return this.el.shadowRoot.getElementById('slider-container');\n }\n\n private get startTextEl() {\n return this.el.shadowRoot.getElementById('start-text');\n }\n\n private get endTextEl() {\n return this.el.shadowRoot.getElementById('end-text');\n }\n\n private get endBackgroundEl() {\n return this.el.shadowRoot.getElementById('end-slider-container-background');\n }\n\n private get startIconEl() {\n return this.el.shadowRoot.getElementById('start-icon');\n }\n\n private get endIconEl() {\n return this.el.shadowRoot.getElementById('end-icon');\n }\n\n render() {\n return (\n <Host>\n <div id=\"slider-container\" class=\"slider-container\">\n <div id=\"start-slider-container-background\" class={{ 'start-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"end-slider-container-background\" class={{ 'end-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"slider\" class={{ slider: true, disabled: this.disabled }}>\n <cpsl-icon id=\"start-icon\" class={{ 'start-icon': true, 'icon': true }} icon={this.startIcon} />\n <cpsl-icon id=\"end-icon\" class={{ 'end-icon': true, 'icon': true }} icon={this.endIcon} />\n </div>\n <span id=\"start-text\" class={{ 'start-text': true, 'disabled': this.disabled }}>\n {this.startText}\n </span>\n <span id=\"end-text\" class=\"end-text\">\n {this.endText}\n </span>\n </div>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --bar-width: 12px;\n --bar-color: var(--cpsl-color-foreground-0);\n --background-color: var(--cpsl-color-background-0);\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n @keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n -webkit-transform: rotate(360deg);\n }\n }\n @-moz-keyframes spin {\n 100% {\n -moz-transform: rotate(360deg);\n }\n }\n @-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 50% {\n -webkit-transform: rotate(180deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n}\n\n.loader {\n position: relative;\n width: 100%;\n aspect-ratio: 1;\n background: conic-gradient(transparent, transparent 12%, var(--bar-color));\n border-radius: 50%;\n margin: auto;\n animation: spin 0.8s cubic-bezier(0.3, 0.5, 0.5, 0.5) infinite;\n\n &::before,\n &::after {\n content: '';\n position: absolute;\n border-radius: inherit;\n }\n\n &::before {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n background: linear-gradient(to left, var(--bar-color) 50%, transparent 50%);\n width: var(--bar-width);\n aspect-ratio: 1;\n }\n\n &::after {\n inset: var(--bar-width);\n background: var(--background-color);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-spinner',\n styleUrl: 'cpsl-spinner.scss',\n shadow: true,\n})\nexport class CpslSpinner {\n /**\n * Size of the spinner in pixels.\n * Default is 50.\n */\n @Prop() size?: number = 54;\n\n /**\n * Rotation speed of the spinner in seconds.\n * Default is 1.\n */\n @Prop() speed?: number = 1;\n\n render() {\n return (\n <Host\n style={{\n height: `${this.size}px`,\n width: `${this.size}px`,\n ['--bar-width']: `${this.size * 0.12}px`,\n }}\n >\n <div class=\"loader\" />\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n // CONTAINER\n --container-height: 24px;\n --container-width: 44px;\n --container-padding: 2px;\n --container-border-radius: var(--cpsl-border-radius-switch);\n --container-background-color-default: var(--cpsl-color-switch-surface-default);\n --container-background-color-checked: var(--cpsl-color-switch-surface-checked);\n\n // THUMB\n --thumb-size: calc(var(--container-height) - var(--container-padding) * 2);\n --thumb-border-radius: var(--cpsl-border-radius-switch);\n --thumb-background-color-default: var(--cpsl-color-switch-thumb-default);\n --thumb-background-color-checked: var(--cpsl-color-switch-thumb-checked);\n\n display: block;\n position: relative;\n\n height: var(--container-height);\n width: var(--container-width);\n cursor: pointer;\n}\n\ninput {\n position: absolute;\n width: 100%;\n height: 100%;\n margin: 0px;\n opacity: 0;\n}\n\nspan.container {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: var(--container-padding);\n border-radius: var(--container-border-radius);\n background: var(--container-background-color-default);\n box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.08) inset;\n\n transition: all 0.15s ease-in-out;\n\n &.checked {\n background: var(--container-background-color-checked);\n box-shadow: none;\n }\n}\n\nspan.thumb {\n display: inline-block;\n position: relative;\n background: var(--thumb-background-color-default);\n box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1);\n height: var(--thumb-size);\n width: var(--thumb-size);\n border-radius: var(--thumb-border-radius);\n transform: translateX(0);\n left: 0;\n transition: all 0.15s ease-in-out;\n\n &.checked {\n background: var(--thumb-background-color-checked);\n left: 100%;\n transform: translateX(-100%);\n }\n}\n","import { Component, Host, Prop, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-switch',\n styleUrl: 'cpsl-switch.scss',\n shadow: true,\n})\nexport class CpslSwitch {\n /**\n * Whether or not the switch is checked.\n */\n @Prop() checked: boolean;\n\n /**\n * Emitted when the switch state changes.\n */\n @Event() cpslSwitchChanged!: EventEmitter<boolean>;\n\n private handleSwitchClick = () => {\n this.cpslSwitchChanged.emit(!this.checked);\n };\n\n render() {\n return (\n <Host>\n <input type=\"checkbox\" checked={this.checked} />\n <span onClick={this.handleSwitchClick} class={{ container: true, checked: this.checked }}>\n <span class={{ thumb: true, checked: this.checked }} />\n </span>\n </Host>\n );\n }\n}\n",":host {\n --tab-color: var(--cpsl-color-text-secondary);\n --tab-gap: 2px;\n --tab-icon-height: 16px;\n --tab-icon-width: 16px;\n\n padding-top: var(--tab-top-padding);\n padding-bottom: var(--tab-bottom-padding);\n padding-left: var(--tab-left-padding);\n padding-right: var(--tab-right-padding);\n\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n\n cursor: pointer;\n\n z-index: 10;\n\n ::slotted([slot='start']) {\n --icon-color: var(--tab-color);\n --height: var(--tab-icon-height);\n --width: var(--tab-icon-width);\n }\n\n ::slotted([slot='end']) {\n --icon-color: var(--tab-color);\n --height: var(--tab-icon-height);\n --width: var(--tab-icon-width);\n }\n}\n\n:host(.selected) {\n --tab-color: var(--cpsl-color-text-primary);\n}\n\n.tab-container {\n align-items: center;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis;\n text-align: center;\n white-space: nowrap;\n font-weight: 500;\n color: var(--tab-color);\n display: flex;\n gap: var(--tab-gap);\n}\n\n.content {\n flex: 1 1 auto;\n}\n","import { Component, Host, Prop, h, Event, EventEmitter, Listen, Element } from '@stencil/core';\nimport { TabClickEventDetail } from './tab-interface';\nimport { TabsChangedEventDetail } from '../cpsl-tabs/tabs-interface';\n\n@Component({\n tag: 'cpsl-tab',\n styleUrl: 'cpsl-tab.scss',\n shadow: true,\n})\nexport class CpslTab {\n @Element() el!: HTMLCpslTabElement;\n\n /**\n * The selected tab component\n */\n @Prop() selected = false;\n\n /**\n * A tab id must be provided for each `cpsl-tab`. It's used internally to reference\n * the selected tab or by the router to switch between them.\n */\n @Prop() tab: string;\n\n /**\n * Emitted when tabs are clicked\n * @internal\n */\n @Event() cpslTabButtonClick!: EventEmitter<TabClickEventDetail>;\n\n @Listen('cpslTabsChanged', { target: 'window' })\n onTabsChanged(ev: CustomEvent<TabsChangedEventDetail>) {\n this.setSelected(ev);\n }\n\n @Listen('cpslTabsInit', { target: 'window' })\n onTabsInit(ev: CustomEvent<TabsChangedEventDetail>) {\n this.setSelected(ev);\n }\n\n private setSelected(ev: CustomEvent<TabsChangedEventDetail>) {\n const dispatchedFrom = ev.target as HTMLElement;\n const parent = this.el.parentElement as EventTarget;\n\n if (ev.composedPath().includes(parent) || dispatchedFrom?.contains(this.el)) {\n this.selected = this.tab === ev.detail.tab;\n }\n }\n\n private onTabClicked = () => {\n this.cpslTabButtonClick.emit({ tab: this.tab, selected: this.selected });\n };\n\n render() {\n return (\n <Host class={{ selected: this.selected }} onClick={this.onTabClicked}>\n <div class={{ 'tab-container': true }}>\n <slot name=\"start\"></slot>\n <div class=\"content\">\n <slot></slot>\n </div>\n <slot name=\"end\"></slot>\n </div>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --container-border-radius: var(--cpsl-border-radius-table-container);\n --container-border-color: var(--cpsl-color-background-16);\n --container-background-color: var(--cpsl-color-background-0);\n --container-border-width: 1px;\n\n --container-header-padding-top: 24px;\n --container-header-padding-bottom: 24px;\n --container-header-padding-start: 24px;\n --container-header-padding-end: 24px;\n --container-header-border-width: 1px;\n --container-header-border-color: var(--cpsl-color-background-16);\n\n --container-footer-padding-top: 16px;\n --container-footer-padding-bottom: 16px;\n --container-footer-padding-start: 24px;\n --container-footer-padding-end: 24px;\n --container-footer-border-width: 1px;\n --container-footer-border-color: var(--cpsl-color-background-8);\n\n --table-header-padding-top: 16px;\n --table-header-padding-bottom: 16px;\n --table-header-padding-start: 24px;\n --table-header-padding-end: 24px;\n --table-header-background-color: var(--cpsl-color-background-4);\n --table-header-border-color: var(--cpsl-color-background-16);\n --table-header-border-width: 1px;\n\n --table-content-padding-top: 16px;\n --table-content-padding-bottom: 16px;\n --table-content-padding-start: 24px;\n --table-content-padding-end: 24px;\n --table-content-border-color: var(--cpsl-color-background-8);\n --table-content-border-width: 1px;\n\n display: block;\n}\n\n:host {\n cpsl-card {\n height: 100%;\n --card-padding-top: 0px;\n --card-padding-bottom: 0px;\n --card-padding-start: 0px;\n --card-padding-end: 0px;\n --card-border-width: var(--container-border-width);\n --card-border-color: var(--container-border-color);\n --card-border-radius: var(--container-border-radius);\n --card-background-color: var(--container-background-color);\n\n &::part(card-container) {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n }\n}\n\n.content {\n flex: 1;\n overflow: auto;\n position: relative;\n}\n\n.overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n\n &.horizontal-scroll:not(.vertical-scroll) {\n box-shadow: -24px 0px 24px -24px rgba(0, 0, 0, 0.1) inset;\n }\n\n &.vertical-scroll:not(.horizontal-scroll) {\n box-shadow: 0px -24px 24px -24px rgba(0, 0, 0, 0.1) inset;\n }\n\n &.horizontal-scroll.vertical-scroll {\n box-shadow: -24px -24px 24px -24px rgba(0, 0, 0, 0.1) inset;\n }\n}\n\n.table-wrapper {\n overflow: auto;\n height: 100%;\n}\n\n.container-header {\n display: none;\n\n @include padding(var(--container-header-padding-top), var(--container-header-padding-end), var(--container-header-padding-bottom), var(--container-header-padding-start));\n border-bottom: var(--container-header-border-width) solid var(--container-header-border-color);\n}\n\n.container-footer {\n display: none;\n\n @include padding(var(--container-footer-padding-top), var(--container-footer-padding-end), var(--container-footer-padding-bottom), var(--container-footer-padding-start));\n border-top: var(--container-footer-border-width) solid var(--container-footer-border-color);\n}\n\n.shown {\n display: block;\n}\n","import { Component, Host, Element, h, State } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-table',\n styleUrl: 'cpsl-table.scss',\n shadow: true,\n})\nexport class CpslTable {\n @Element() el!: HTMLCpslTableElement;\n\n @State() hasHorizontalScroll: boolean = false;\n @State() hasVerticalScroll: boolean = false;\n\n componentDidLoad() {\n this.resizeOb.observe(this.contentContainerEl);\n }\n\n private resizeOb = new ResizeObserver(entries => {\n // since we are observing only a single element, so we access the first element in entries array\n const rect = entries[0].contentRect;\n\n // current width & height\n const containerWidth = Math.round(rect.width);\n const containerHeight = Math.round(rect.height);\n const contentWidth = this.containerSlotEl.clientWidth;\n const contentHeight = this.containerSlotEl.clientHeight;\n\n if (contentWidth > containerWidth) {\n this.hasHorizontalScroll = true;\n } else {\n this.hasHorizontalScroll = false;\n }\n if (contentHeight > containerHeight) {\n this.hasVerticalScroll = true;\n } else {\n this.hasVerticalScroll = false;\n }\n });\n\n private get containerHeaderEl() {\n return this.el.querySelector('[slot=\"header\"]');\n }\n\n private get containerFooterEl() {\n return this.el.querySelector('[slot=\"footer\"]');\n }\n\n private get contentContainerEl() {\n return this.el.shadowRoot.getElementById('content-container');\n }\n\n private get headerEl() {\n return this.el.shadowRoot.getElementById('header-container');\n }\n\n private get containerSlotEl() {\n return this.el.querySelector('[slot=\"content\"]');\n }\n\n private get footerEl() {\n return this.el.shadowRoot.getElementById('footer-container');\n }\n\n render() {\n return (\n <Host>\n <cpsl-card part=\"table-container\" style={{ position: 'relative' }}>\n <div id=\"header-container\" class={{ 'container-header': true, 'shown': Boolean(this.containerHeaderEl) }}>\n <slot name=\"header\"></slot>\n </div>\n <div id=\"content-container\" class={{ 'content': true, 'horizontal-scroll': this.hasHorizontalScroll, 'vertical-scroll': this.hasVerticalScroll }} part=\"content\">\n <slot name=\"content\"></slot>\n </div>\n {this.headerEl && this.contentContainerEl && this.footerEl && (\n <div\n style={{ top: `${this.headerEl.clientHeight + 2}px`, height: `${this.contentContainerEl.clientHeight}px` }}\n class={{ 'overlay': true, 'horizontal-scroll': this.hasHorizontalScroll, 'vertical-scroll': this.hasVerticalScroll }}\n />\n )}\n <div id=\"footer-container\" class={{ 'container-footer': true, 'shown': Boolean(this.containerFooterEl) }}>\n <slot name=\"footer\"></slot>\n </div>\n </cpsl-card>\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --tab-top-padding: 5px;\n --tab-bottom-padding: 5px;\n --tab-left-padding: 16px;\n --tab-right-padding: 16px;\n\n --tabs-border-radius: var(--cpsl-border-radius-tabs);\n --tabs-font-size: 12px;\n --tabs-line-height: 24px;\n --tabs-border-width: 1px;\n --tabs-border-color: var(--cpsl-color-tabs-border);\n --tabs-background-color: var(--cpsl-color-tabs-background);\n\n --slider-background-color: var(--cpsl-color-tabs-slider-background);\n\n display: inline-block;\n max-width: 100%;\n font-family: $font-family-base;\n}\n\n:host(.full-width) {\n display: block;\n}\n\n.tabs-container {\n position: relative;\n display: flex;\n overflow-x: scroll;\n overflow-y: hidden;\n\n border-width: var(--tabs-border-width);\n border-style: solid;\n border-color: var(--tabs-border-color);\n border-radius: var(--tabs-border-radius);\n\n background: var(--tabs-background-color);\n\n font-size: var(--tabs-font-size);\n line-height: var(--tabs-line-height);\n\n &::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n\n.slider {\n position: absolute;\n top: calc(var(--tabs-border-width) * -1);\n bottom: calc(var(--tabs-border-width) * -1);\n left: -1px;\n margin: 4px;\n\n border-radius: var(--tabs-border-radius);\n\n background: var(--slider-background-color);\n}\n\n.loaded {\n transition: all 0.5s;\n}\n","import { Component, Host, Element, h, Event, Prop, EventEmitter, State, Watch } from '@stencil/core';\nimport { TabClickEventDetail } from '../cpsl-tab/tab-interface';\nimport { TabsChangedEventDetail } from './tabs-interface';\n\n@Component({\n tag: 'cpsl-tabs',\n styleUrl: 'cpsl-tabs.scss',\n shadow: true,\n})\nexport class CpslTabs {\n @Element() el!: HTMLCpslTabsElement;\n\n @State() selectedTabRect?: DOMRect;\n @State() loaded: boolean = false;\n\n /**\n * Whether or not the tabs take the full width of their container.\n */\n @Prop() fullWidth?: boolean;\n\n /**\n * The selected tab component\n */\n @Prop() selectedTab?: string;\n\n /**\n * Emitted when a tab is changed\n */\n @Event() cpslTabsChanged!: EventEmitter<TabsChangedEventDetail>;\n\n /**\n * Emitted when tabs are initialized\n * @internal\n */\n @Event() cpslTabsInit!: EventEmitter<TabsChangedEventDetail>;\n\n @Watch('fullWidth')\n updateSlider() {\n // Allow component to condense or expand before recalculating silder\n setTimeout(() => {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();\n }, 50);\n }\n\n @Watch('selectedTab')\n updateTab(newValue?: string, oldValue?: string) {\n if (Boolean(newValue) && !oldValue) {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();\n }\n }\n\n componentWillLoad() {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab)?.getBoundingClientRect() ?? ({ width: 0, x: 0 } as DOMRect);\n\n this.cpslTabsInit.emit({\n tab: this.selectedTab,\n });\n }\n\n componentDidLoad() {\n this.selectedTabRect = getTab(this.tabs, this.selectedTab)?.getBoundingClientRect() ?? ({ width: 0, x: 0 } as DOMRect);\n\n // Allow slider to be rendered with the correct initial style before the transition is added\n setTimeout(() => {\n this.loaded = true;\n }, 50);\n }\n\n private get tabs() {\n return Array.from(this.el.querySelectorAll('cpsl-tab'));\n }\n\n private onTabClicked = (ev: CustomEvent<TabClickEventDetail>) => {\n const { tab } = ev.detail;\n\n if (tab !== this.selectedTab) {\n this.selectedTabRect = getTab(this.tabs, tab).getBoundingClientRect();\n\n this.cpslTabsChanged.emit({\n tab,\n });\n }\n };\n\n render() {\n const tabsPosition = this.el.getBoundingClientRect();\n // Get border width as a number\n const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);\n const selectedTabRect = this.selectedTabRect;\n\n return (\n <Host class={{ 'full-width': this.fullWidth }} onCpslTabButtonClick={this.onTabClicked}>\n <div class=\"tabs-container\">\n <slot></slot>\n <div\n class={{ slider: true, loaded: this.loaded }}\n style={{ width: `${selectedTabRect.width - 8}px`, left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth}px` }}\n />\n </div>\n </Host>\n );\n }\n}\n\nconst getTab = (tabs: HTMLCpslTabElement[], tab: string | HTMLCpslTabElement): HTMLCpslTabElement | undefined => {\n const tabEl = typeof tab === 'string' ? tabs.find(t => t.tab === tab) : tab;\n\n return tabEl;\n};\n","@import '../../themes/capsule.globals';\n\n:host {\n font-family: $font-family-base;\n\n color: var(--cpsl-color-text-primary);\n padding: 0px;\n margin: 0px;\n\n display: block;\n\n &::-moz-selection {\n /* Code for Firefox */\n color: var(--cpsl-color-text-inverted) !important;\n background: var(--cpsl-color-background-64) !important;\n }\n\n &::selection {\n color: var(--cpsl-color-text-inverted) !important;\n background: var(--cpsl-color-background-64) !important;\n }\n}\n\n:host p,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n padding: 0px;\n margin: 0px;\n font-weight: inherit;\n font-size: inherit;\n letter-spacing: inherit;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n font-smooth: never;\n}\n\n:host(.primary) {\n color: var(--cpsl-color-text-primary);\n}\n\n:host(.secondary) {\n color: var(--cpsl-color-text-secondary);\n}\n\n:host(.tertiary) {\n color: var(--cpsl-color-text-tertiary);\n}\n\n:host(.subtle) {\n color: var(--cpsl-color-text-subtle);\n}\n\n:host(.inverted) {\n color: var(--cpsl-color-text-inverted);\n}\n\n:host(.error) {\n color: var(--cpsl-color-text-error);\n}\n\n:host(.contrast) {\n color: var(--cpsl-color-text-contrast);\n}\n\n:host(.medium) {\n font-weight: 500;\n}\n\n:host(.semi-bold) {\n font-weight: 600;\n}\n\n:host(.bold) {\n font-weight: 700;\n}\n\n:host(.body-2xs) {\n font-size: var(--cpsl-font-size-body-2xs);\n}\n\n:host(.body-xs) {\n font-size: var(--cpsl-font-size-body-xs);\n}\n\n:host(.body-s) {\n font-size: var(--cpsl-font-size-body-s);\n line-height: 142.857%;\n}\n\n:host(.body-m) {\n font-size: var(--cpsl-font-size-body-m);\n line-height: 150%;\n}\n\n:host(.body-l) {\n font-size: var(--cpsl-font-size-body-l);\n line-height: 140%;\n}\n\n:host(.body-xl) {\n font-size: var(--cpsl-font-size-body-xl);\n}\n\n:host(.heading-xs) {\n font-size: var(--cpsl-font-size-heading-xs);\n}\n\n:host(.heading-s) {\n font-size: var(--cpsl-font-size-heading-s);\n}\n\n:host(.heading-m) {\n font-size: var(--cpsl-font-size-heading-m);\n letter-spacing: -0.4px;\n}\n\n:host(.heading-l) {\n font-size: var(--cpsl-font-size-heading-l);\n letter-spacing: -1.12px;\n}\n\n:host(.heading-xl) {\n font-size: var(--cpsl-font-size-heading-xl);\n letter-spacing: -1.28px;\n}\n\n:host(.heading-2xl) {\n font-size: var(--cpsl-font-size-heading-2xl);\n letter-spacing: -1.44px;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n /**\n * The color of text.\n * Options are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"subtle\", `\"inverted\", `\"error\".\n * Default is: `\"primary\"`.\n */\n @Prop() color?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error' | 'contrast' = 'primary';\n\n /**\n * The variant of text.\n * Options are: `\"body2XS\"`, `\"bodyXS\", `\"bodyS\", `\"bodyM\", `\"bodyL\", `\"bodyXL\", `\"headingXS\", `\"headingS\", `\"headingM\", `\"headingL\", `\"headingXL\", `\"heading2XL\".\n * Default is: `\"bodyM\"`.\n */\n @Prop() variant?: 'body2XS' | 'bodyXS' | 'bodyS' | 'bodyM' | 'bodyL' | 'bodyXL' | 'headingXS' | 'headingS' | 'headingM' | 'headingL' | 'headingXL' | 'heading2XL' = 'bodyM';\n\n /**\n * The weight of text.\n * Options are: `\"regular\"`, `\"medium\", `\"semiBold\", `\"bold\".\n * Default is: `\"regular\"`.\n */\n @Prop() weight?: 'regular' | 'medium' | 'semiBold' | 'bold' = 'regular';\n\n private get Content() {\n switch (this.variant) {\n case 'headingXS': {\n return (\n <h6>\n <slot></slot>\n </h6>\n );\n }\n case 'headingS': {\n return (\n <h5>\n <slot></slot>\n </h5>\n );\n }\n case 'headingM': {\n return (\n <h4>\n <slot></slot>\n </h4>\n );\n }\n case 'headingL': {\n return (\n <h3>\n <slot></slot>\n </h3>\n );\n }\n case 'headingXL': {\n return (\n <h2>\n <slot></slot>\n </h2>\n );\n }\n case 'heading2XL': {\n return (\n <h1>\n <slot></slot>\n </h1>\n );\n }\n default: {\n return (\n <p>\n <slot></slot>\n </p>\n );\n }\n }\n }\n\n render() {\n return (\n <Host\n class={{\n // COLORS\n 'primary': this.color === 'primary',\n 'secondary': this.color === 'secondary',\n 'tertiary': this.color === 'tertiary',\n 'subtle': this.color === 'subtle',\n 'inverted': this.color === 'inverted',\n 'error': this.color === 'error',\n 'contrast': this.color === 'contrast',\n // WEIGHTS\n 'medium': this.weight === 'medium',\n 'semi-bold': this.weight === 'semiBold',\n 'bold': this.weight === 'bold',\n // SIZES\n 'body-2xs': this.variant === 'body2XS',\n 'body-xs': this.variant === 'bodyXS',\n 'body-s': this.variant === 'bodyS',\n 'body-m': this.variant === 'bodyM',\n 'body-l': this.variant === 'bodyL',\n 'body-xl': this.variant === 'bodyXL',\n 'heading-xs': this.variant === 'headingXS',\n 'heading-s': this.variant === 'headingS',\n 'heading-m': this.variant === 'headingM',\n 'heading-l': this.variant === 'headingL',\n 'heading-xl': this.variant === 'headingXL',\n 'heading-2xl': this.variant === 'heading2XL',\n }}\n >\n {this.Content}\n </Host>\n );\n }\n}\n","@import '../../themes/capsule.globals';\n\n:host {\n --button-icon-color: var(--cpsl-color-text-primary);\n\n --button-border-radius: var(--cpsl-border-radius-tile-button);\n\n --button-background-color: var(--cpsl-color-tile-button-surface-default);\n --button-border-color: var(--cpsl-color-tile-button-border);\n\n --button-width: 72px;\n --button-height: 56px;\n --button-gap: 8px;\n}\n\n:host {\n :hover {\n --button-background-color: var(--cpsl-color-tile-button-surface-hover);\n }\n :active {\n --button-background-color: var(--cpsl-color-tile-button-surface-pressed);\n }\n}\n\n.button-native {\n @include border-radius(var(--button-border-radius));\n @include padding(var(--button-padding-top), var(--button-padding-end), var(--button-padding-bottom), var(--button-padding-start));\n\n border: 1px solid transparent;\n cursor: pointer;\n\n background: var(--button-background-color);\n border-color: var(--button-border-color);\n\n display: flex;\n flex-direction: column;\n gap: var(--button-gap);\n\n align-items: center;\n justify-content: center;\n\n width: var(--button-width);\n height: var(--button-height);\n\n box-shadow: var(--button-box-shadow);\n\n cpsl-icon {\n --icon-color: var(--button-icon-color);\n --height: var(--button-icon-height);\n --width: var(--button-icon-width);\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-tile-button',\n styleUrl: 'cpsl-tile-button.scss',\n shadow: true,\n})\nexport class CpslTileButton {\n /**\n * The external source of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() src?: string;\n\n /**\n * The name of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() icon?: IconType;\n\n render() {\n return (\n <Host>\n <button class=\"button-native\">\n <cpsl-icon exportparts=\"icon\" src={this.src} icon={this.icon} />\n <slot></slot>\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"kHAAA,MAAMA,EAAe,u7CACrB,MAAAC,EAAeD,E,MCOFE,EAAS,M,0DAW2C,O,CAE/D,YAAYC,GAKV,OAAQC,KAAKC,SACX,IAAK,SAAU,CACb,OAAOC,S,CAET,IAAK,UAAW,CACd,MAAO,a,CAET,IAAK,UAAW,CACd,MAAO,a,CAET,IAAK,QACL,QAAS,CACP,MAAO,a,GAKb,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAO,CAAEC,MAAOR,KAAKC,UAAY,QAASQ,QAAST,KAAKC,UAAY,UAAWS,QAASV,KAAKC,UAAY,YAC7GG,EAAA,OAAAE,IAAA,2CAAKC,MAAM,mBACRP,KAAKD,UAAYK,EAAA,aAAAE,IAAA,2CAAWK,KAAMX,KAAKD,WACxCK,EAAA,QAAAE,IAAA,8C,aChDV,MAAMM,EAAgB,2GACtB,MAAAC,EAAeD,E,MCMFE,EAAU,M,6DAUmB,Q,8BAOxC,MAAAX,GACE,OACEC,EAACC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