Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
define("theme_boost/bootstrap/tooltip",["exports","./tools/sanitizer","jquery","core/popper","./util"],(function(_exports,_sanitizer,_jquery,_popper,_util){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_jquery=_interopRequireDefault(_jquery),_popper=_interopRequireDefault(_popper),_util=_interopRequireDefault(_util);const NAME="tooltip",EVENT_KEY=".".concat("bs.tooltip"),JQUERY_NO_CONFLICT=_jquery.default.fn[NAME],BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)".concat("bs-tooltip","\\S+"),"g"),DISALLOWED_ATTRIBUTES=["sanitize","whiteList","sanitizeFn"],AttachmentMap={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Default={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:_sanitizer.DefaultWhitelist,popperConfig:null},DefaultType={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Event={HIDE:"hide".concat(EVENT_KEY),HIDDEN:"hidden".concat(EVENT_KEY),SHOW:"show".concat(EVENT_KEY),SHOWN:"shown".concat(EVENT_KEY),INSERTED:"inserted".concat(EVENT_KEY),CLICK:"click".concat(EVENT_KEY),FOCUSIN:"focusin".concat(EVENT_KEY),FOCUSOUT:"focusout".concat(EVENT_KEY),MOUSEENTER:"mouseenter".concat(EVENT_KEY),MOUSELEAVE:"mouseleave".concat(EVENT_KEY)};class Tooltip{constructor(element,config){if(void 0===_popper.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=element,this.config=this._getConfig(config),this.tip=null,this._setListeners()}static get VERSION(){return"4.6.2"}static get Default(){return Default}static get NAME(){return NAME}static get DATA_KEY(){return"bs.tooltip"}static get Event(){return Event}static get EVENT_KEY(){return EVENT_KEY}static get DefaultType(){return DefaultType}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(event){if(this._isEnabled)if(event){const dataKey=this.constructor.DATA_KEY;let context=(0,_jquery.default)(event.currentTarget).data(dataKey);context||(context=new this.constructor(event.currentTarget,this._getDelegateConfig()),(0,_jquery.default)(event.currentTarget).data(dataKey,context)),context._activeTrigger.click=!context._activeTrigger.click,context._isWithActiveTrigger()?context._enter(null,context):context._leave(null,context)}else{if((0,_jquery.default)(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),_jquery.default.removeData(this.element,this.constructor.DATA_KEY),(0,_jquery.default)(this.element).off(this.constructor.EVENT_KEY),(0,_jquery.default)(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&(0,_jquery.default)(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null}show(){if("none"===(0,_jquery.default)(this.element).css("display"))throw new Error("Please use show on visible elements");const showEvent=_jquery.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){(0,_jquery.default)(this.element).trigger(showEvent);const shadowRoot=_util.default.findShadowRoot(this.element),isInTheDom=_jquery.default.contains(null!==shadowRoot?shadowRoot:this.element.ownerDocument.documentElement,this.element);if(showEvent.isDefaultPrevented()||!isInTheDom)return;const tip=this.getTipElement(),tipId=_util.default.getUID(this.constructor.NAME);tip.setAttribute("id",tipId),this.element.setAttribute("aria-describedby",tipId),this.setContent(),this.config.animation&&(0,_jquery.default)(tip).addClass("fade");const placement="function"==typeof this.config.placement?this.config.placement.call(this,tip,this.element):this.config.placement,attachment=this._getAttachment(placement);this.addAttachmentClass(attachment);const container=this._getContainer();(0,_jquery.default)(tip).data(this.constructor.DATA_KEY,this),_jquery.default.contains(this.element.ownerDocument.documentElement,this.tip)||(0,_jquery.default)(tip).appendTo(container),(0,_jquery.default)(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new _popper.default(this.element,tip,this._getPopperConfig(attachment)),(0,_jquery.default)(tip).addClass("show"),(0,_jquery.default)(tip).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&(0,_jquery.default)(document.body).children().on("mouseover",null,_jquery.default.noop);const complete=()=>{this.config.animation&&this._fixTransition();const prevHoverState=this._hoverState;this._hoverState=null,(0,_jquery.default)(this.element).trigger(this.constructor.Event.SHOWN),"out"===prevHoverState&&this._leave(null,this)};if((0,_jquery.default)(this.tip).hasClass("fade")){const transitionDuration=_util.default.getTransitionDurationFromElement(this.tip);(0,_jquery.default)(this.tip).one(_util.default.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete()}}hide(callback){const tip=this.getTipElement(),hideEvent=_jquery.default.Event(this.constructor.Event.HIDE),complete=()=>{"show"!==this._hoverState&&tip.parentNode&&tip.parentNode.removeChild(tip),this._cleanTipClass(),this.element.removeAttribute("aria-describedby"),(0,_jquery.default)(this.element).trigger(this.constructor.Event.HIDDEN),null!==this._popper&&this._popper.destroy(),callback&&callback()};if((0,_jquery.default)(this.element).trigger(hideEvent),!hideEvent.isDefaultPrevented()){if((0,_jquery.default)(tip).removeClass("show"),"ontouchstart"in document.documentElement&&(0,_jquery.default)(document.body).children().off("mouseover",null,_jquery.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,(0,_jquery.default)(this.tip).hasClass("fade")){const transitionDuration=_util.default.getTransitionDurationFromElement(tip);(0,_jquery.default)(tip).one(_util.default.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete();this._hoverState=""}}update(){null!==this._popper&&this._popper.scheduleUpdate()}isWithContent(){return Boolean(this.getTitle())}addAttachmentClass(attachment){(0,_jquery.default)(this.getTipElement()).addClass("".concat("bs-tooltip","-").concat(attachment))}getTipElement(){return this.tip=this.tip||(0,_jquery.default)(this.config.template)[0],this.tip}setContent(){const tip=this.getTipElement();this.setElementContent((0,_jquery.default)(tip.querySelectorAll(".tooltip-inner")),this.getTitle()),(0,_jquery.default)(tip).removeClass("".concat("fade"," ").concat("show"))}setElementContent($element,content){"object"!=typeof content||!content.nodeType&&!content.jquery?this.config.html?(this.config.sanitize&&(content=(0,_sanitizer.sanitizeHtml)(content,this.config.whiteList,this.config.sanitizeFn)),$element.html(content)):$element.text(content):this.config.html?(0,_jquery.default)(content).parent().is($element)||$element.empty().append(content):$element.text((0,_jquery.default)(content).text())}getTitle(){let title=this.element.getAttribute("data-original-title");return title||(title="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),title}_getPopperConfig(attachment){return{...{placement:attachment,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:data=>{data.originalPlacement!==data.placement&&this._handlePopperPlacementChange(data)},onUpdate:data=>this._handlePopperPlacementChange(data)},...this.config.popperConfig}}_getOffset(){const offset={};return"function"==typeof this.config.offset?offset.fn=data=>(data.offsets={...data.offsets,...this.config.offset(data.offsets,this.element)},data):offset.offset=this.config.offset,offset}_getContainer(){return!1===this.config.container?document.body:_util.default.isElement(this.config.container)?(0,_jquery.default)(this.config.container):(0,_jquery.default)(document).find(this.config.container)}_getAttachment(placement){return AttachmentMap[placement.toUpperCase()]}_setListeners(){this.config.trigger.split(" ").forEach((trigger=>{if("click"===trigger)(0,_jquery.default)(this.element).on(this.constructor.Event.CLICK,this.config.selector,(event=>this.toggle(event)));else if("manual"!==trigger){const eventIn="hover"===trigger?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,eventOut="hover"===trigger?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;(0,_jquery.default)(this.element).on(eventIn,this.config.selector,(event=>this._enter(event))).on(eventOut,this.config.selector,(event=>this._leave(event)))}})),this._hideModalHandler=()=>{this.element&&this.hide()},(0,_jquery.default)(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config={...this.config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const titleType=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==titleType)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))}_enter(event,context){const dataKey=this.constructor.DATA_KEY;(context=context||(0,_jquery.default)(event.currentTarget).data(dataKey))||(context=new this.constructor(event.currentTarget,this._getDelegateConfig()),(0,_jquery.default)(event.currentTarget).data(dataKey,context)),event&&(context._activeTrigger["focusin"===event.type?"focus":"hover"]=!0),(0,_jquery.default)(context.getTipElement()).hasClass("show")||"show"===context._hoverState?context._hoverState="show":(clearTimeout(context._timeout),context._hoverState="show",context.config.delay&&context.config.delay.show?context._timeout=setTimeout((()=>{"show"===context._hoverState&&context.show()}),context.config.delay.show):context.show())}_leave(event,context){const dataKey=this.constructor.DATA_KEY;(context=context||(0,_jquery.default)(event.currentTarget).data(dataKey))||(context=new this.constructor(event.currentTarget,this._getDelegateConfig()),(0,_jquery.default)(event.currentTarget).data(dataKey,context)),event&&(context._activeTrigger["focusout"===event.type?"focus":"hover"]=!1),context._isWithActiveTrigger()||(clearTimeout(context._timeout),context._hoverState="out",context.config.delay&&context.config.delay.hide?context._timeout=setTimeout((()=>{"out"===context._hoverState&&context.hide()}),context.config.delay.hide):context.hide())}_isWithActiveTrigger(){for(const trigger in this._activeTrigger)if(this._activeTrigger[trigger])return!0;return!1}_getConfig(config){const dataAttributes=(0,_jquery.default)(this.element).data();return Object.keys(dataAttributes).forEach((dataAttr=>{-1!==DISALLOWED_ATTRIBUTES.indexOf(dataAttr)&&delete dataAttributes[dataAttr]})),"number"==typeof(config={...this.constructor.Default,...dataAttributes,..."object"==typeof config&&config?config:{}}).delay&&(config.delay={show:config.delay,hide:config.delay}),"number"==typeof config.title&&(config.title=config.title.toString()),"number"==typeof config.content&&(config.content=config.content.toString()),_util.default.typeCheckConfig(NAME,config,this.constructor.DefaultType),config.sanitize&&(config.template=(0,_sanitizer.sanitizeHtml)(config.template,config.whiteList,config.sanitizeFn)),config}_getDelegateConfig(){const config={};if(this.config)for(const key in this.config)this.constructor.Default[key]!==this.config[key]&&(config[key]=this.config[key]);return config}_cleanTipClass(){const $tip=(0,_jquery.default)(this.getTipElement()),tabClass=$tip.attr("class").match(BSCLS_PREFIX_REGEX);null!==tabClass&&tabClass.length&&$tip.removeClass(tabClass.join(""))}_handlePopperPlacementChange(popperData){this.tip=popperData.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(popperData.placement))}_fixTransition(){const tip=this.getTipElement(),initConfigAnimation=this.config.animation;null===tip.getAttribute("x-placement")&&((0,_jquery.default)(tip).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=initConfigAnimation)}static _jQueryInterface(config){return this.each((function(){const $element=(0,_jquery.default)(this);let data=$element.data("bs.tooltip");const _config="object"==typeof config&&config;if((data||!/dispose|hide/.test(config))&&(data||(data=new Tooltip(this,_config),$element.data("bs.tooltip",data)),"string"==typeof config)){if(void 0===data[config])throw new TypeError('No method named "'.concat(config,'"'));data[config]()}}))}}_jquery.default.fn[NAME]=Tooltip._jQueryInterface,_jquery.default.fn[NAME].Constructor=Tooltip,_jquery.default.fn[NAME].noConflict=()=>(_jquery.default.fn[NAME]=JQUERY_NO_CONFLICT,Tooltip._jQueryInterface);var _default=Tooltip;return _exports.default=_default,_exports.default}));
1
define("theme_boost/bootstrap/tooltip",["exports","core/popper2","./base-component","./dom/event-handler","./dom/manipulator","./util/index","./util/sanitizer","./util/template-factory"],(function(_exports,Popper,_baseComponent,_eventHandler,_manipulator,_index,_sanitizer,_templateFactory){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Popper=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(Popper),_baseComponent=_interopRequireDefault(_baseComponent),_eventHandler=_interopRequireDefault(_eventHandler),_manipulator=_interopRequireDefault(_manipulator),_templateFactory=_interopRequireDefault(_templateFactory);const DISALLOWED_ATTRIBUTES=new Set(["sanitize","allowList","sanitizeFn"]),SELECTOR_MODAL=".".concat("modal"),AttachmentMap={AUTO:"auto",TOP:"top",RIGHT:(0,_index.isRTL)()?"left":"right",BOTTOM:"bottom",LEFT:(0,_index.isRTL)()?"right":"left"},Default={allowList:_sanitizer.DefaultAllowlist,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},DefaultType={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Tooltip extends _baseComponent.default{constructor(element,config){if(void 0===Popper)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(element,config),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Default}static get DefaultType(){return DefaultType}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),_eventHandler.default.off(this._element.closest(SELECTOR_MODAL),"hide.bs.modal",this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const showEvent=_eventHandler.default.trigger(this._element,this.constructor.eventName("show")),isInTheDom=((0,_index.findShadowRoot)(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(showEvent.defaultPrevented||!isInTheDom)return;this._disposePopper();const tip=this._getTipElement();this._element.setAttribute("aria-describedby",tip.getAttribute("id"));const{container:container}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(container.append(tip),_eventHandler.default.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(tip),tip.classList.add("show"),"ontouchstart"in document.documentElement)for(const element of[].concat(...document.body.children))_eventHandler.default.on(element,"mouseover",_index.noop);this._queueCallback((()=>{_eventHandler.default.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(_eventHandler.default.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove("show"),"ontouchstart"in document.documentElement)for(const element of[].concat(...document.body.children))_eventHandler.default.off(element,"mouseover",_index.noop);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),_eventHandler.default.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(content){const tip=this._getTemplateFactory(content).toHtml();if(!tip)return null;tip.classList.remove("fade","show"),tip.classList.add("bs-".concat(this.constructor.NAME,"-auto"));const tipId=(0,_index.getUID)(this.constructor.NAME).toString();return tip.setAttribute("id",tipId),this._isAnimated()&&tip.classList.add("fade"),tip}setContent(content){this._newContent=content,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(content){return this._templateFactory?this._templateFactory.changeContent(content):this._templateFactory=new _templateFactory.default({...this._config,content:content,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(event){return this.constructor.getOrCreateInstance(event.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains("fade")}_isShown(){return this.tip&&this.tip.classList.contains("show")}_createPopper(tip){const placement=(0,_index.execute)(this._config.placement,[this,tip,this._element]),attachment=AttachmentMap[placement.toUpperCase()];return Popper.createPopper(this._element,tip,this._getPopperConfig(attachment))}_getOffset(){const{offset:offset}=this._config;return"string"==typeof offset?offset.split(",").map((value=>Number.parseInt(value,10))):"function"==typeof offset?popperData=>offset(popperData,this._element):offset}_resolvePossibleFunction(arg){return(0,_index.execute)(arg,[this._element])}_getPopperConfig(attachment){const defaultBsPopperConfig={placement:attachment,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:".".concat(this.constructor.NAME,"-arrow")}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:data=>{this._getTipElement().setAttribute("data-popper-placement",data.state.placement)}}]};return{...defaultBsPopperConfig,...(0,_index.execute)(this._config.popperConfig,[defaultBsPopperConfig])}}_setListeners(){const triggers=this._config.trigger.split(" ");for(const trigger of triggers)if("click"===trigger)_eventHandler.default.on(this._element,this.constructor.eventName("click"),this._config.selector,(event=>{this._initializeOnDelegatedTarget(event).toggle()}));else if("manual"!==trigger){const eventIn="hover"===trigger?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),eventOut="hover"===trigger?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");_eventHandler.default.on(this._element,eventIn,this._config.selector,(event=>{const context=this._initializeOnDelegatedTarget(event);context._activeTrigger["focusin"===event.type?"focus":"hover"]=!0,context._enter()})),_eventHandler.default.on(this._element,eventOut,this._config.selector,(event=>{const context=this._initializeOnDelegatedTarget(event);context._activeTrigger["focusout"===event.type?"focus":"hover"]=context._element.contains(event.relatedTarget),context._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},_eventHandler.default.on(this._element.closest(SELECTOR_MODAL),"hide.bs.modal",this._hideModalHandler)}_fixTitle(){const title=this._element.getAttribute("title");title&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",title),this._element.setAttribute("data-bs-original-title",title),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(handler,timeout){clearTimeout(this._timeout),this._timeout=setTimeout(handler,timeout)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(config){const dataAttributes=_manipulator.default.getDataAttributes(this._element);for(const dataAttribute of Object.keys(dataAttributes))DISALLOWED_ATTRIBUTES.has(dataAttribute)&&delete dataAttributes[dataAttribute];return config={...dataAttributes,..."object"==typeof config&&config?config:{}},config=this._mergeConfigObj(config),config=this._configAfterMerge(config),this._typeCheckConfig(config),config}_configAfterMerge(config){return config.container=!1===config.container?document.body:(0,_index.getElement)(config.container),"number"==typeof config.delay&&(config.delay={show:config.delay,hide:config.delay}),"number"==typeof config.title&&(config.title=config.title.toString()),"number"==typeof config.content&&(config.content=config.content.toString()),config}_getDelegateConfig(){const config={};for(const[key,value]of Object.entries(this._config))this.constructor.Default[key]!==value&&(config[key]=value);return config.selector=!1,config.trigger="manual",config}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(config){return this.each((function(){const data=Tooltip.getOrCreateInstance(this,config);if("string"==typeof config){if(void 0===data[config])throw new TypeError('No method named "'.concat(config,'"'));data[config]()}}))}}(0,_index.defineJQueryPlugin)(Tooltip);var _default=Tooltip;return _exports.default=_default,_exports.default}));
Línea 2... Línea 2...
2
 
2
 
3
//# sourceMappingURL=tooltip.min.js.map
3
//# sourceMappingURL=tooltip.min.js.map