OSDN Git Service

fix bug and add tool for claim tx
[bytom/vapor.git] / tools / side_chain_tool / web / node_modules / bootstrap / js / dist / popover.js
1 (function (global, factory) {
2   typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
3   typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
4   (global.Popover = factory(global.jQuery,global.Tooltip));
5 }(this, (function ($,Tooltip) { 'use strict';
6
7   $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
8   Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip;
9
10   function _defineProperties(target, props) {
11     for (var i = 0; i < props.length; i++) {
12       var descriptor = props[i];
13       descriptor.enumerable = descriptor.enumerable || false;
14       descriptor.configurable = true;
15       if ("value" in descriptor) descriptor.writable = true;
16       Object.defineProperty(target, descriptor.key, descriptor);
17     }
18   }
19
20   function _createClass(Constructor, protoProps, staticProps) {
21     if (protoProps) _defineProperties(Constructor.prototype, protoProps);
22     if (staticProps) _defineProperties(Constructor, staticProps);
23     return Constructor;
24   }
25
26   function _defineProperty(obj, key, value) {
27     if (key in obj) {
28       Object.defineProperty(obj, key, {
29         value: value,
30         enumerable: true,
31         configurable: true,
32         writable: true
33       });
34     } else {
35       obj[key] = value;
36     }
37
38     return obj;
39   }
40
41   function _objectSpread(target) {
42     for (var i = 1; i < arguments.length; i++) {
43       var source = arguments[i] != null ? arguments[i] : {};
44       var ownKeys = Object.keys(source);
45
46       if (typeof Object.getOwnPropertySymbols === 'function') {
47         ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
48           return Object.getOwnPropertyDescriptor(source, sym).enumerable;
49         }));
50       }
51
52       ownKeys.forEach(function (key) {
53         _defineProperty(target, key, source[key]);
54       });
55     }
56
57     return target;
58   }
59
60   function _inheritsLoose(subClass, superClass) {
61     subClass.prototype = Object.create(superClass.prototype);
62     subClass.prototype.constructor = subClass;
63     subClass.__proto__ = superClass;
64   }
65
66   /**
67    * --------------------------------------------------------------------------
68    * Bootstrap (v4.1.3): popover.js
69    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
70    * --------------------------------------------------------------------------
71    */
72
73   var Popover = function ($$$1) {
74     /**
75      * ------------------------------------------------------------------------
76      * Constants
77      * ------------------------------------------------------------------------
78      */
79     var NAME = 'popover';
80     var VERSION = '4.1.3';
81     var DATA_KEY = 'bs.popover';
82     var EVENT_KEY = "." + DATA_KEY;
83     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
84     var CLASS_PREFIX = 'bs-popover';
85     var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
86
87     var Default = _objectSpread({}, Tooltip.Default, {
88       placement: 'right',
89       trigger: 'click',
90       content: '',
91       template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
92     });
93
94     var DefaultType = _objectSpread({}, Tooltip.DefaultType, {
95       content: '(string|element|function)'
96     });
97
98     var ClassName = {
99       FADE: 'fade',
100       SHOW: 'show'
101     };
102     var Selector = {
103       TITLE: '.popover-header',
104       CONTENT: '.popover-body'
105     };
106     var Event = {
107       HIDE: "hide" + EVENT_KEY,
108       HIDDEN: "hidden" + EVENT_KEY,
109       SHOW: "show" + EVENT_KEY,
110       SHOWN: "shown" + EVENT_KEY,
111       INSERTED: "inserted" + EVENT_KEY,
112       CLICK: "click" + EVENT_KEY,
113       FOCUSIN: "focusin" + EVENT_KEY,
114       FOCUSOUT: "focusout" + EVENT_KEY,
115       MOUSEENTER: "mouseenter" + EVENT_KEY,
116       MOUSELEAVE: "mouseleave" + EVENT_KEY
117       /**
118        * ------------------------------------------------------------------------
119        * Class Definition
120        * ------------------------------------------------------------------------
121        */
122
123     };
124
125     var Popover =
126     /*#__PURE__*/
127     function (_Tooltip) {
128       _inheritsLoose(Popover, _Tooltip);
129
130       function Popover() {
131         return _Tooltip.apply(this, arguments) || this;
132       }
133
134       var _proto = Popover.prototype;
135
136       // Overrides
137       _proto.isWithContent = function isWithContent() {
138         return this.getTitle() || this._getContent();
139       };
140
141       _proto.addAttachmentClass = function addAttachmentClass(attachment) {
142         $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
143       };
144
145       _proto.getTipElement = function getTipElement() {
146         this.tip = this.tip || $$$1(this.config.template)[0];
147         return this.tip;
148       };
149
150       _proto.setContent = function setContent() {
151         var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events
152
153         this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
154
155         var content = this._getContent();
156
157         if (typeof content === 'function') {
158           content = content.call(this.element);
159         }
160
161         this.setElementContent($tip.find(Selector.CONTENT), content);
162         $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
163       }; // Private
164
165
166       _proto._getContent = function _getContent() {
167         return this.element.getAttribute('data-content') || this.config.content;
168       };
169
170       _proto._cleanTipClass = function _cleanTipClass() {
171         var $tip = $$$1(this.getTipElement());
172         var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
173
174         if (tabClass !== null && tabClass.length > 0) {
175           $tip.removeClass(tabClass.join(''));
176         }
177       }; // Static
178
179
180       Popover._jQueryInterface = function _jQueryInterface(config) {
181         return this.each(function () {
182           var data = $$$1(this).data(DATA_KEY);
183
184           var _config = typeof config === 'object' ? config : null;
185
186           if (!data && /destroy|hide/.test(config)) {
187             return;
188           }
189
190           if (!data) {
191             data = new Popover(this, _config);
192             $$$1(this).data(DATA_KEY, data);
193           }
194
195           if (typeof config === 'string') {
196             if (typeof data[config] === 'undefined') {
197               throw new TypeError("No method named \"" + config + "\"");
198             }
199
200             data[config]();
201           }
202         });
203       };
204
205       _createClass(Popover, null, [{
206         key: "VERSION",
207         // Getters
208         get: function get() {
209           return VERSION;
210         }
211       }, {
212         key: "Default",
213         get: function get() {
214           return Default;
215         }
216       }, {
217         key: "NAME",
218         get: function get() {
219           return NAME;
220         }
221       }, {
222         key: "DATA_KEY",
223         get: function get() {
224           return DATA_KEY;
225         }
226       }, {
227         key: "Event",
228         get: function get() {
229           return Event;
230         }
231       }, {
232         key: "EVENT_KEY",
233         get: function get() {
234           return EVENT_KEY;
235         }
236       }, {
237         key: "DefaultType",
238         get: function get() {
239           return DefaultType;
240         }
241       }]);
242
243       return Popover;
244     }(Tooltip);
245     /**
246      * ------------------------------------------------------------------------
247      * jQuery
248      * ------------------------------------------------------------------------
249      */
250
251
252     $$$1.fn[NAME] = Popover._jQueryInterface;
253     $$$1.fn[NAME].Constructor = Popover;
254
255     $$$1.fn[NAME].noConflict = function () {
256       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
257       return Popover._jQueryInterface;
258     };
259
260     return Popover;
261   }($);
262
263   return Popover;
264
265 })));
266 //# sourceMappingURL=popover.js.map