jekyll-theme-centos 2.2.0.pre.true.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/aws-images.csv +81 -0
- data/_data/full-altarchlist.csv +74 -0
- data/_data/full-mirrorlist.csv +609 -0
- data/_includes/breadcrumbs.html +1 -1
- data/_includes/default/header.html +10 -2
- data/_includes/footer.html +1 -1
- data/_includes/head-datatables.html +3 -3
- data/_includes/head.html +1 -1
- data/_includes/home/distributions.html +1 -1
- data/_includes/home/header.html +2 -2
- data/_includes/home/news-and-events.html +6 -9
- data/_includes/home/planet.html +9 -10
- data/_includes/home/sponsors.html +1 -1
- data/_includes/people/about.html +12 -14
- data/_includes/people/posts.html +16 -14
- data/_includes/people/projects.html +19 -17
- data/_includes/people/pubkeys.html +15 -16
- data/_includes/people/support.html +13 -10
- data/_includes/post-nav-explorer.html +1 -1
- data/_includes/search.html +2 -2
- data/_layouts/blog.html +1 -1
- data/_layouts/default.html +2 -10
- data/_layouts/home.html +0 -1
- data/_sass/bootstrap/_accordion.scss +149 -0
- data/_sass/bootstrap/_alert.scss +71 -0
- data/_sass/bootstrap/_badge.scss +38 -0
- data/_sass/bootstrap/_breadcrumb.scss +40 -0
- data/_sass/bootstrap/_button-group.scss +142 -0
- data/_sass/bootstrap/_buttons.scss +207 -0
- data/_sass/bootstrap/_card.scss +234 -0
- data/_sass/bootstrap/_carousel.scss +226 -0
- data/_sass/bootstrap/_close.scss +40 -0
- data/_sass/bootstrap/_containers.scss +41 -0
- data/_sass/bootstrap/_dropdown.scss +249 -0
- data/_sass/bootstrap/_forms.scss +9 -0
- data/_sass/bootstrap/_functions.scss +302 -0
- data/_sass/bootstrap/_grid.scss +33 -0
- data/_sass/bootstrap/_helpers.scss +10 -0
- data/_sass/bootstrap/_images.scss +42 -0
- data/_sass/bootstrap/_list-group.scss +192 -0
- data/_sass/bootstrap/_maps.scss +54 -0
- data/_sass/bootstrap/_mixins.scss +43 -0
- data/_sass/bootstrap/_modal.scss +237 -0
- data/_sass/bootstrap/_nav.scss +172 -0
- data/_sass/bootstrap/_navbar.scss +278 -0
- data/_sass/bootstrap/_offcanvas.scss +144 -0
- data/_sass/bootstrap/_pagination.scss +109 -0
- data/_sass/bootstrap/_placeholders.scss +51 -0
- data/_sass/bootstrap/_popover.scss +196 -0
- data/_sass/bootstrap/_progress.scss +59 -0
- data/_sass/bootstrap/_reboot.scss +610 -0
- data/_sass/bootstrap/_root.scss +73 -0
- data/_sass/bootstrap/_spinners.scss +85 -0
- data/_sass/bootstrap/_tables.scss +164 -0
- data/_sass/bootstrap/_toasts.scss +73 -0
- data/_sass/bootstrap/_tooltip.scss +120 -0
- data/_sass/bootstrap/_transitions.scss +27 -0
- data/_sass/bootstrap/_type.scss +106 -0
- data/_sass/bootstrap/_utilities.scss +647 -0
- data/_sass/bootstrap/_variables.scss +1634 -0
- data/_sass/bootstrap/bootstrap-grid.scss +64 -0
- data/_sass/bootstrap/bootstrap-reboot.scss +9 -0
- data/_sass/bootstrap/bootstrap-utilities.scss +18 -0
- data/_sass/bootstrap/bootstrap.scss +51 -0
- data/_sass/bootstrap/forms/_floating-labels.scss +75 -0
- data/_sass/bootstrap/forms/_form-check.scss +175 -0
- data/_sass/bootstrap/forms/_form-control.scss +194 -0
- data/_sass/bootstrap/forms/_form-range.scss +91 -0
- data/_sass/bootstrap/forms/_form-select.scss +71 -0
- data/_sass/bootstrap/forms/_form-text.scss +11 -0
- data/_sass/bootstrap/forms/_input-group.scss +132 -0
- data/_sass/bootstrap/forms/_labels.scss +36 -0
- data/_sass/bootstrap/forms/_validation.scss +12 -0
- data/_sass/bootstrap/helpers/_clearfix.scss +3 -0
- data/_sass/bootstrap/helpers/_color-bg.scss +10 -0
- data/_sass/bootstrap/helpers/_colored-links.scss +12 -0
- data/_sass/bootstrap/helpers/_position.scss +36 -0
- data/_sass/bootstrap/helpers/_ratio.scss +26 -0
- data/_sass/bootstrap/helpers/_stacks.scss +15 -0
- data/_sass/bootstrap/helpers/_stretched-link.scss +15 -0
- data/_sass/bootstrap/helpers/_text-truncation.scss +7 -0
- data/_sass/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/_sass/bootstrap/helpers/_vr.scss +8 -0
- data/_sass/bootstrap/mixins/_alert.scss +15 -0
- data/_sass/bootstrap/mixins/_backdrop.scss +14 -0
- data/_sass/bootstrap/mixins/_banner.scss +9 -0
- data/_sass/bootstrap/mixins/_border-radius.scss +78 -0
- data/_sass/bootstrap/mixins/_box-shadow.scss +18 -0
- data/_sass/bootstrap/mixins/_breakpoints.scss +127 -0
- data/_sass/bootstrap/mixins/_buttons.scss +70 -0
- data/_sass/bootstrap/mixins/_caret.scss +64 -0
- data/_sass/bootstrap/mixins/_clearfix.scss +9 -0
- data/_sass/bootstrap/mixins/_color-scheme.scss +7 -0
- data/_sass/bootstrap/mixins/_container.scss +11 -0
- data/_sass/bootstrap/mixins/_deprecate.scss +10 -0
- data/_sass/bootstrap/mixins/_forms.scss +152 -0
- data/_sass/bootstrap/mixins/_gradients.scss +47 -0
- data/_sass/bootstrap/mixins/_grid.scss +151 -0
- data/_sass/bootstrap/mixins/_image.scss +16 -0
- data/_sass/bootstrap/mixins/_list-group.scss +24 -0
- data/_sass/bootstrap/mixins/_lists.scss +7 -0
- data/_sass/bootstrap/mixins/_pagination.scss +10 -0
- data/_sass/bootstrap/mixins/_reset-text.scss +17 -0
- data/_sass/bootstrap/mixins/_resize.scss +6 -0
- data/_sass/bootstrap/mixins/_table-variants.scss +24 -0
- data/_sass/bootstrap/mixins/_text-truncate.scss +8 -0
- data/_sass/bootstrap/mixins/_transition.scss +26 -0
- data/_sass/bootstrap/mixins/_utilities.scss +97 -0
- data/_sass/bootstrap/mixins/_visually-hidden.scss +29 -0
- data/_sass/bootstrap/utilities/_api.scss +47 -0
- data/_sass/bootstrap/vendor/_rfs.scss +354 -0
- data/_sass/centos/_headings.scss +17 -0
- data/_sass/centos/_links.scss +5 -56
- data/_sass/centos/_variables.scss +2 -4
- data/_sass/fontawesome-free/_animated.scss +153 -0
- data/_sass/fontawesome-free/_bordered-pulled.scss +20 -0
- data/_sass/fontawesome-free/_core.scss +43 -0
- data/_sass/fontawesome-free/_fixed-width.scss +7 -0
- data/_sass/fontawesome-free/_functions.scss +57 -0
- data/_sass/fontawesome-free/_icons.scss +9 -0
- data/_sass/fontawesome-free/_list.scss +18 -0
- data/_sass/fontawesome-free/_mixins.scss +75 -0
- data/_sass/fontawesome-free/_rotated-flipped.scss +31 -0
- data/_sass/fontawesome-free/_screen-reader.scss +14 -0
- data/_sass/fontawesome-free/_shims.scss +2042 -0
- data/_sass/fontawesome-free/_sizing.scss +16 -0
- data/_sass/fontawesome-free/_stacked.scss +32 -0
- data/_sass/fontawesome-free/_variables.scss +4957 -0
- data/_sass/fontawesome-free/brands.scss +30 -0
- data/_sass/fontawesome-free/fontawesome.scss +21 -0
- data/_sass/fontawesome-free/regular.scss +26 -0
- data/_sass/fontawesome-free/solid.scss +26 -0
- data/_sass/fontawesome-free/v4-shims.scss +11 -0
- data/_sass/montserrat/_montserrat.scss +79 -0
- data/_sass/overpass-mono/_overpass-mono.scss +33 -0
- data/assets/css/dataTables.bootstrap5.css +416 -0
- data/assets/css/dataTables.bootstrap5.min.css +2 -2
- data/assets/css/stylesheet.min.scss +15 -12
- data/assets/img/anaconda-symbolic.svg +1 -0
- data/assets/img/anaconda.svg +1 -0
- data/assets/img/centos-dynamicmsg-logo.svg +1 -0
- data/assets/img/centos-dynamicmsg-type.svg +1 -0
- data/assets/img/centos-dynamicmsg-whitelogo.svg +1 -0
- data/assets/img/centos-dynamicmsg-whitetype.svg +1 -0
- data/assets/img/centos-gdm-whitelogo.svg +1 -0
- data/assets/img/centos-ipa-whiteheader.svg +1 -0
- data/assets/img/centos-logo-2bits.svg +1 -0
- data/assets/img/centos-logo.svg +1 -103
- data/assets/img/centos-message-logo.svg +1 -0
- data/assets/img/centos-motif.png +0 -0
- data/assets/img/centos-poweredby-logo.svg +1 -0
- data/assets/img/centos-symbol-2bits.svg +1 -0
- data/assets/img/centos-symbol.svg +1 -69
- data/assets/img/centos-type.svg +1 -0
- data/assets/img/centos-vertical-logo.svg +1 -0
- data/assets/img/centos-vertical-message-logo.svg +1 -0
- data/assets/img/centos-whitelogo.svg +1 -109
- data/assets/js/bootstrap.bundle.js +7075 -0
- data/assets/js/bootstrap.bundle.js.map +1 -0
- data/assets/js/bootstrap.bundle.min.js +2 -2
- data/assets/js/bootstrap.bundle.min.js.map +1 -1
- data/assets/js/bootstrap.esm.js +5202 -0
- data/assets/js/bootstrap.esm.js.map +1 -0
- data/assets/js/bootstrap.esm.min.js +7 -0
- data/assets/js/bootstrap.esm.min.js.map +1 -0
- data/assets/js/bootstrap.js +5249 -0
- data/assets/js/bootstrap.js.map +1 -0
- data/assets/js/bootstrap.min.js +7 -0
- data/assets/js/bootstrap.min.js.map +1 -0
- data/assets/js/clipboard.js +890 -0
- data/assets/js/clipboard.min.js +0 -0
- data/assets/js/dataTables.bootstrap5.js +200 -0
- data/assets/js/dataTables.bootstrap5.min.js +4 -14
- data/assets/js/dataTables.bootstrap5.min.mjs +4 -0
- data/assets/js/dataTables.bootstrap5.mjs +164 -0
- data/assets/js/jquery.js +10993 -0
- data/assets/js/jquery.min.js +2 -2
- data/assets/js/jquery.min.map +1 -1
- data/assets/js/jquery.slim.js +8894 -0
- data/assets/js/jquery.slim.min.js +2 -0
- data/assets/js/jquery.slim.min.map +1 -0
- data/assets/webfonts/fa-brands-400.ttf +0 -0
- data/assets/webfonts/fa-brands-400.woff2 +0 -0
- data/assets/webfonts/fa-regular-400.ttf +0 -0
- data/assets/webfonts/fa-regular-400.woff2 +0 -0
- data/assets/webfonts/fa-solid-900.ttf +0 -0
- data/assets/webfonts/fa-solid-900.woff2 +0 -0
- data/assets/webfonts/fa-v4compatibility.ttf +0 -0
- data/assets/webfonts/fa-v4compatibility.woff2 +0 -0
- data/assets/webfonts/overpass-mono-bold.woff +0 -0
- data/assets/webfonts/overpass-mono-bold.woff2 +0 -0
- data/assets/webfonts/overpass-mono-light.woff +0 -0
- data/assets/webfonts/overpass-mono-light.woff2 +0 -0
- data/assets/webfonts/overpass-mono-regular.woff +0 -0
- data/assets/webfonts/overpass-mono-regular.woff2 +0 -0
- data/assets/webfonts/overpass-mono-semibold.woff +0 -0
- data/assets/webfonts/overpass-mono-semibold.woff2 +0 -0
- data/default.md +165 -0
- data/index.md +9 -0
- data/people.md +63 -0
- metadata +186 -145
- data/_sass/centos/centos-blog.scss +0 -46
- data/_sass/centos/centos-httpd.scss +0 -27
- data/_sass/centos/centos-lists.scss +0 -161
- data/_sass/centos/fonts/_montserrat.scss +0 -253
- data/_sass/centos/fonts/_overpass.scss +0 -43
- data/assets/img/centos-symbol-with-shadow.svg +0 -89
- data/assets/img/centos-symbol.png +0 -0
- data/assets/img/distributions/centos-linux/7/screenshot-1.png +0 -0
- data/assets/img/distributions/centos-linux/7/screenshot-2.png +0 -0
- data/assets/img/distributions/centos-linux/7/screenshot-3.png +0 -0
- data/assets/img/distributions/centos-linux/7/screenshot-4.png +0 -0
- data/assets/img/distributions/centos-stream/9/screenshot-1.png +0 -0
- data/assets/img/distributions/centos-stream/9/screenshot-2.png +0 -0
- data/assets/img/distributions/centos-stream/9/screenshot-3.png +0 -0
- data/assets/img/favicon.png +0 -0
- data/assets/img/sponsors/15minuteservers.png +0 -0
- data/assets/img/sponsors/2014-11-10-vi.gif +0 -0
- data/assets/img/sponsors/45drives.png +0 -0
- data/assets/img/sponsors/BackupVault.png +0 -0
- data/assets/img/sponsors/Banner_Castlegem_240x60.gif +0 -0
- data/assets/img/sponsors/CentOS-CBSL-02.png +0 -0
- data/assets/img/sponsors/GameHost.png +0 -0
- data/assets/img/sponsors/HOST1PLUS_240x60.jpg +0 -0
- data/assets/img/sponsors/HostDime_Logo_Slogan_300_71.png +0 -0
- data/assets/img/sponsors/NDCHost.png +0 -0
- data/assets/img/sponsors/OffshoreServers.png +0 -0
- data/assets/img/sponsors/OffshoreVPS.png +0 -0
- data/assets/img/sponsors/PNAP-Logo-CMYK.JPG +0 -0
- data/assets/img/sponsors/PNAP_Banner.gif +0 -0
- data/assets/img/sponsors/PSW_Banner_240x60.jpg +0 -0
- data/assets/img/sponsors/ad_lfcpxen_240x60.png +0 -0
- data/assets/img/sponsors/altushost.png +0 -0
- data/assets/img/sponsors/am-logo.png +0 -0
- data/assets/img/sponsors/aws.png +0 -0
- data/assets/img/sponsors/baseip_240x60.jpg +0 -0
- data/assets/img/sponsors/cdn77.png +0 -0
- data/assets/img/sponsors/centos-serverhub.png +0 -0
- data/assets/img/sponsors/clientvps.png +0 -0
- data/assets/img/sponsors/codero.png +0 -0
- data/assets/img/sponsors/codero_small.gif +0 -0
- data/assets/img/sponsors/coloau.png +0 -0
- data/assets/img/sponsors/colocation-america.png +0 -0
- data/assets/img/sponsors/cologuard.png +0 -0
- data/assets/img/sponsors/constant.png +0 -0
- data/assets/img/sponsors/coreix.jpg +0 -0
- data/assets/img/sponsors/cpanel.png +0 -0
- data/assets/img/sponsors/dbd_240_60.jpg +0 -0
- data/assets/img/sponsors/dedicatednow.gif +0 -0
- data/assets/img/sponsors/dedicatedsolutions.png +0 -0
- data/assets/img/sponsors/dtsnet.png +0 -0
- data/assets/img/sponsors/eStruxture.png +0 -0
- data/assets/img/sponsors/equinix.png +0 -0
- data/assets/img/sponsors/eukhost.png +0 -0
- data/assets/img/sponsors/exabytes.png +0 -0
- data/assets/img/sponsors/fasthosts.png +0 -0
- data/assets/img/sponsors/galaxy_small.gif +0 -0
- data/assets/img/sponsors/globotech.png +0 -0
- data/assets/img/sponsors/godaddy.jpg +0 -0
- data/assets/img/sponsors/heficed.png +0 -0
- data/assets/img/sponsors/host-engine.png +0 -0
- data/assets/img/sponsors/host-stage.png +0 -0
- data/assets/img/sponsors/host1plus_logo.png +0 -0
- data/assets/img/sponsors/hostasaurus240x60banner.gif +0 -0
- data/assets/img/sponsors/hostdime_br_small.jpg +0 -0
- data/assets/img/sponsors/hostingswift240x60.gif +0 -0
- data/assets/img/sponsors/hostiserver.png +0 -0
- data/assets/img/sponsors/hostkey_small.gif +0 -0
- data/assets/img/sponsors/internap.png +0 -0
- data/assets/img/sponsors/internetx.gif +0 -0
- data/assets/img/sponsors/intevation.png +0 -0
- data/assets/img/sponsors/iomart-240x60.gif +0 -0
- data/assets/img/sponsors/iomart.png +0 -0
- data/assets/img/sponsors/itsyndicate.png +0 -0
- data/assets/img/sponsors/leaseweb.png +0 -0
- data/assets/img/sponsors/liquidweb.png +0 -0
- data/assets/img/sponsors/lyrahosting.png +0 -0
- data/assets/img/sponsors/miva.png +0 -0
- data/assets/img/sponsors/multacom-240x60.gif +0 -0
- data/assets/img/sponsors/ndc_host_240.gif +0 -0
- data/assets/img/sponsors/netelligent_small.png +0 -0
- data/assets/img/sponsors/nexcess.png +0 -0
- data/assets/img/sponsors/packet.png +0 -0
- data/assets/img/sponsors/pidginhost.png +0 -0
- data/assets/img/sponsors/profvds.png +0 -0
- data/assets/img/sponsors/psychz-234x60.jpg +0 -0
- data/assets/img/sponsors/psychz_net.gif +0 -0
- data/assets/img/sponsors/ptisp.png +0 -0
- data/assets/img/sponsors/redstation.png +0 -0
- data/assets/img/sponsors/scaleway_logo.png +0 -0
- data/assets/img/sponsors/seedvps.png +0 -0
- data/assets/img/sponsors/serverel.png +0 -0
- data/assets/img/sponsors/servermania.gif +0 -0
- data/assets/img/sponsors/serverpoint.png +0 -0
- data/assets/img/sponsors/serverpronto_small.gif +0 -0
- data/assets/img/sponsors/shinjirubanner260x60.gif +0 -0
- data/assets/img/sponsors/space-hosting.png +0 -0
- data/assets/img/sponsors/sponsor_placeholder-240-60.png +0 -0
- data/assets/img/sponsors/steadfast.png +0 -0
- data/assets/img/sponsors/steadfast_234x60.gif +0 -0
- data/assets/img/sponsors/tailoredservers.png +0 -0
- data/assets/img/sponsors/trabia.png +0 -0
- data/assets/img/sponsors/vhostvn.gif +0 -0
- data/assets/img/sponsors/vitelity.png +0 -0
- data/assets/img/sponsors/voyant.png +0 -0
- data/assets/img/sponsors/vsys.png +0 -0
- data/assets/img/sponsors/webnx1.png +0 -0
- data/assets/img/sponsors/wehaveservers.png +0 -0
- data/assets/img/sponsors/whitelabelitsolutions.gif +0 -0
- data/assets/img/sponsors/wow.234x60.gif +0 -0
- data/assets/js/jquery.dataTables.min.js +0 -192
- data/assets/webfonts/Overpass-Black.woff2 +0 -0
- data/assets/webfonts/Overpass-BlackItalic.woff2 +0 -0
- data/assets/webfonts/Overpass-Bold.woff2 +0 -0
- data/assets/webfonts/Overpass-BoldItalic.woff2 +0 -0
- data/assets/webfonts/Overpass-ExtraBold.woff2 +0 -0
- data/assets/webfonts/Overpass-ExtraBoldItalic.woff2 +0 -0
- data/assets/webfonts/Overpass-ExtraLight.woff2 +0 -0
- data/assets/webfonts/Overpass-ExtraLightItalic.woff2 +0 -0
- data/assets/webfonts/Overpass-Italic.woff2 +0 -0
- data/assets/webfonts/Overpass-Light.woff2 +0 -0
- data/assets/webfonts/Overpass-LightItalic.woff2 +0 -0
- data/assets/webfonts/Overpass-Medium.woff2 +0 -0
- data/assets/webfonts/Overpass-MediumItalic.woff2 +0 -0
- data/assets/webfonts/Overpass-Regular.woff2 +0 -0
- data/assets/webfonts/Overpass-SemiBold.woff2 +0 -0
- data/assets/webfonts/Overpass-SemiBoldItalic.woff2 +0 -0
- data/assets/webfonts/Overpass-Thin.woff2 +0 -0
- data/assets/webfonts/Overpass-ThinItalic.woff2 +0 -0
- data/assets/webfonts/OverpassMono-Bold.woff2 +0 -0
- data/assets/webfonts/OverpassMono-Light.woff2 +0 -0
- data/assets/webfonts/OverpassMono-Medium.woff2 +0 -0
- data/assets/webfonts/OverpassMono-Regular.woff2 +0 -0
- data/assets/webfonts/OverpassMono-SemiBold.woff2 +0 -0
- data/assets/webfonts/fa-brands-400.woff +0 -0
- data/assets/webfonts/fa-regular-400.woff +0 -0
- data/assets/webfonts/fa-solid-900.woff +0 -0
@@ -0,0 +1,890 @@
|
|
1
|
+
/*!
|
2
|
+
* clipboard.js v2.0.11
|
3
|
+
* https://clipboardjs.com/
|
4
|
+
*
|
5
|
+
* Licensed MIT © Zeno Rocha
|
6
|
+
*/
|
7
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
8
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
9
|
+
module.exports = factory();
|
10
|
+
else if(typeof define === 'function' && define.amd)
|
11
|
+
define([], factory);
|
12
|
+
else if(typeof exports === 'object')
|
13
|
+
exports["ClipboardJS"] = factory();
|
14
|
+
else
|
15
|
+
root["ClipboardJS"] = factory();
|
16
|
+
})(this, function() {
|
17
|
+
return /******/ (function() { // webpackBootstrap
|
18
|
+
/******/ var __webpack_modules__ = ({
|
19
|
+
|
20
|
+
/***/ 686:
|
21
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
22
|
+
|
23
|
+
"use strict";
|
24
|
+
|
25
|
+
// EXPORTS
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
27
|
+
"default": function() { return /* binding */ clipboard; }
|
28
|
+
});
|
29
|
+
|
30
|
+
// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
|
31
|
+
var tiny_emitter = __webpack_require__(279);
|
32
|
+
var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);
|
33
|
+
// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
|
34
|
+
var listen = __webpack_require__(370);
|
35
|
+
var listen_default = /*#__PURE__*/__webpack_require__.n(listen);
|
36
|
+
// EXTERNAL MODULE: ./node_modules/select/src/select.js
|
37
|
+
var src_select = __webpack_require__(817);
|
38
|
+
var select_default = /*#__PURE__*/__webpack_require__.n(src_select);
|
39
|
+
;// CONCATENATED MODULE: ./src/common/command.js
|
40
|
+
/**
|
41
|
+
* Executes a given operation type.
|
42
|
+
* @param {String} type
|
43
|
+
* @return {Boolean}
|
44
|
+
*/
|
45
|
+
function command(type) {
|
46
|
+
try {
|
47
|
+
return document.execCommand(type);
|
48
|
+
} catch (err) {
|
49
|
+
return false;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
;// CONCATENATED MODULE: ./src/actions/cut.js
|
53
|
+
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Cut action wrapper.
|
57
|
+
* @param {String|HTMLElement} target
|
58
|
+
* @return {String}
|
59
|
+
*/
|
60
|
+
|
61
|
+
var ClipboardActionCut = function ClipboardActionCut(target) {
|
62
|
+
var selectedText = select_default()(target);
|
63
|
+
command('cut');
|
64
|
+
return selectedText;
|
65
|
+
};
|
66
|
+
|
67
|
+
/* harmony default export */ var actions_cut = (ClipboardActionCut);
|
68
|
+
;// CONCATENATED MODULE: ./src/common/create-fake-element.js
|
69
|
+
/**
|
70
|
+
* Creates a fake textarea element with a value.
|
71
|
+
* @param {String} value
|
72
|
+
* @return {HTMLElement}
|
73
|
+
*/
|
74
|
+
function createFakeElement(value) {
|
75
|
+
var isRTL = document.documentElement.getAttribute('dir') === 'rtl';
|
76
|
+
var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS
|
77
|
+
|
78
|
+
fakeElement.style.fontSize = '12pt'; // Reset box model
|
79
|
+
|
80
|
+
fakeElement.style.border = '0';
|
81
|
+
fakeElement.style.padding = '0';
|
82
|
+
fakeElement.style.margin = '0'; // Move element out of screen horizontally
|
83
|
+
|
84
|
+
fakeElement.style.position = 'absolute';
|
85
|
+
fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically
|
86
|
+
|
87
|
+
var yPosition = window.pageYOffset || document.documentElement.scrollTop;
|
88
|
+
fakeElement.style.top = "".concat(yPosition, "px");
|
89
|
+
fakeElement.setAttribute('readonly', '');
|
90
|
+
fakeElement.value = value;
|
91
|
+
return fakeElement;
|
92
|
+
}
|
93
|
+
;// CONCATENATED MODULE: ./src/actions/copy.js
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
/**
|
98
|
+
* Create fake copy action wrapper using a fake element.
|
99
|
+
* @param {String} target
|
100
|
+
* @param {Object} options
|
101
|
+
* @return {String}
|
102
|
+
*/
|
103
|
+
|
104
|
+
var fakeCopyAction = function fakeCopyAction(value, options) {
|
105
|
+
var fakeElement = createFakeElement(value);
|
106
|
+
options.container.appendChild(fakeElement);
|
107
|
+
var selectedText = select_default()(fakeElement);
|
108
|
+
command('copy');
|
109
|
+
fakeElement.remove();
|
110
|
+
return selectedText;
|
111
|
+
};
|
112
|
+
/**
|
113
|
+
* Copy action wrapper.
|
114
|
+
* @param {String|HTMLElement} target
|
115
|
+
* @param {Object} options
|
116
|
+
* @return {String}
|
117
|
+
*/
|
118
|
+
|
119
|
+
|
120
|
+
var ClipboardActionCopy = function ClipboardActionCopy(target) {
|
121
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
122
|
+
container: document.body
|
123
|
+
};
|
124
|
+
var selectedText = '';
|
125
|
+
|
126
|
+
if (typeof target === 'string') {
|
127
|
+
selectedText = fakeCopyAction(target, options);
|
128
|
+
} else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {
|
129
|
+
// If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
|
130
|
+
selectedText = fakeCopyAction(target.value, options);
|
131
|
+
} else {
|
132
|
+
selectedText = select_default()(target);
|
133
|
+
command('copy');
|
134
|
+
}
|
135
|
+
|
136
|
+
return selectedText;
|
137
|
+
};
|
138
|
+
|
139
|
+
/* harmony default export */ var actions_copy = (ClipboardActionCopy);
|
140
|
+
;// CONCATENATED MODULE: ./src/actions/default.js
|
141
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
/**
|
146
|
+
* Inner function which performs selection from either `text` or `target`
|
147
|
+
* properties and then executes copy or cut operations.
|
148
|
+
* @param {Object} options
|
149
|
+
*/
|
150
|
+
|
151
|
+
var ClipboardActionDefault = function ClipboardActionDefault() {
|
152
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
153
|
+
// Defines base properties passed from constructor.
|
154
|
+
var _options$action = options.action,
|
155
|
+
action = _options$action === void 0 ? 'copy' : _options$action,
|
156
|
+
container = options.container,
|
157
|
+
target = options.target,
|
158
|
+
text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.
|
159
|
+
|
160
|
+
if (action !== 'copy' && action !== 'cut') {
|
161
|
+
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
162
|
+
} // Sets the `target` property using an element that will be have its content copied.
|
163
|
+
|
164
|
+
|
165
|
+
if (target !== undefined) {
|
166
|
+
if (target && _typeof(target) === 'object' && target.nodeType === 1) {
|
167
|
+
if (action === 'copy' && target.hasAttribute('disabled')) {
|
168
|
+
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
169
|
+
}
|
170
|
+
|
171
|
+
if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
|
172
|
+
throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
|
173
|
+
}
|
174
|
+
} else {
|
175
|
+
throw new Error('Invalid "target" value, use a valid Element');
|
176
|
+
}
|
177
|
+
} // Define selection strategy based on `text` property.
|
178
|
+
|
179
|
+
|
180
|
+
if (text) {
|
181
|
+
return actions_copy(text, {
|
182
|
+
container: container
|
183
|
+
});
|
184
|
+
} // Defines which selection strategy based on `target` property.
|
185
|
+
|
186
|
+
|
187
|
+
if (target) {
|
188
|
+
return action === 'cut' ? actions_cut(target) : actions_copy(target, {
|
189
|
+
container: container
|
190
|
+
});
|
191
|
+
}
|
192
|
+
};
|
193
|
+
|
194
|
+
/* harmony default export */ var actions_default = (ClipboardActionDefault);
|
195
|
+
;// CONCATENATED MODULE: ./src/clipboard.js
|
196
|
+
function clipboard_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return clipboard_typeof(obj); }
|
197
|
+
|
198
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
199
|
+
|
200
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
201
|
+
|
202
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
203
|
+
|
204
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
205
|
+
|
206
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
207
|
+
|
208
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
209
|
+
|
210
|
+
function _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
211
|
+
|
212
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
213
|
+
|
214
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
215
|
+
|
216
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
/**
|
224
|
+
* Helper function to retrieve attribute value.
|
225
|
+
* @param {String} suffix
|
226
|
+
* @param {Element} element
|
227
|
+
*/
|
228
|
+
|
229
|
+
function getAttributeValue(suffix, element) {
|
230
|
+
var attribute = "data-clipboard-".concat(suffix);
|
231
|
+
|
232
|
+
if (!element.hasAttribute(attribute)) {
|
233
|
+
return;
|
234
|
+
}
|
235
|
+
|
236
|
+
return element.getAttribute(attribute);
|
237
|
+
}
|
238
|
+
/**
|
239
|
+
* Base class which takes one or more elements, adds event listeners to them,
|
240
|
+
* and instantiates a new `ClipboardAction` on each click.
|
241
|
+
*/
|
242
|
+
|
243
|
+
|
244
|
+
var Clipboard = /*#__PURE__*/function (_Emitter) {
|
245
|
+
_inherits(Clipboard, _Emitter);
|
246
|
+
|
247
|
+
var _super = _createSuper(Clipboard);
|
248
|
+
|
249
|
+
/**
|
250
|
+
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
251
|
+
* @param {Object} options
|
252
|
+
*/
|
253
|
+
function Clipboard(trigger, options) {
|
254
|
+
var _this;
|
255
|
+
|
256
|
+
_classCallCheck(this, Clipboard);
|
257
|
+
|
258
|
+
_this = _super.call(this);
|
259
|
+
|
260
|
+
_this.resolveOptions(options);
|
261
|
+
|
262
|
+
_this.listenClick(trigger);
|
263
|
+
|
264
|
+
return _this;
|
265
|
+
}
|
266
|
+
/**
|
267
|
+
* Defines if attributes would be resolved using internal setter functions
|
268
|
+
* or custom functions that were passed in the constructor.
|
269
|
+
* @param {Object} options
|
270
|
+
*/
|
271
|
+
|
272
|
+
|
273
|
+
_createClass(Clipboard, [{
|
274
|
+
key: "resolveOptions",
|
275
|
+
value: function resolveOptions() {
|
276
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
277
|
+
this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
|
278
|
+
this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
|
279
|
+
this.text = typeof options.text === 'function' ? options.text : this.defaultText;
|
280
|
+
this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
|
281
|
+
}
|
282
|
+
/**
|
283
|
+
* Adds a click event listener to the passed trigger.
|
284
|
+
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
285
|
+
*/
|
286
|
+
|
287
|
+
}, {
|
288
|
+
key: "listenClick",
|
289
|
+
value: function listenClick(trigger) {
|
290
|
+
var _this2 = this;
|
291
|
+
|
292
|
+
this.listener = listen_default()(trigger, 'click', function (e) {
|
293
|
+
return _this2.onClick(e);
|
294
|
+
});
|
295
|
+
}
|
296
|
+
/**
|
297
|
+
* Defines a new `ClipboardAction` on each click event.
|
298
|
+
* @param {Event} e
|
299
|
+
*/
|
300
|
+
|
301
|
+
}, {
|
302
|
+
key: "onClick",
|
303
|
+
value: function onClick(e) {
|
304
|
+
var trigger = e.delegateTarget || e.currentTarget;
|
305
|
+
var action = this.action(trigger) || 'copy';
|
306
|
+
var text = actions_default({
|
307
|
+
action: action,
|
308
|
+
container: this.container,
|
309
|
+
target: this.target(trigger),
|
310
|
+
text: this.text(trigger)
|
311
|
+
}); // Fires an event based on the copy operation result.
|
312
|
+
|
313
|
+
this.emit(text ? 'success' : 'error', {
|
314
|
+
action: action,
|
315
|
+
text: text,
|
316
|
+
trigger: trigger,
|
317
|
+
clearSelection: function clearSelection() {
|
318
|
+
if (trigger) {
|
319
|
+
trigger.focus();
|
320
|
+
}
|
321
|
+
|
322
|
+
window.getSelection().removeAllRanges();
|
323
|
+
}
|
324
|
+
});
|
325
|
+
}
|
326
|
+
/**
|
327
|
+
* Default `action` lookup function.
|
328
|
+
* @param {Element} trigger
|
329
|
+
*/
|
330
|
+
|
331
|
+
}, {
|
332
|
+
key: "defaultAction",
|
333
|
+
value: function defaultAction(trigger) {
|
334
|
+
return getAttributeValue('action', trigger);
|
335
|
+
}
|
336
|
+
/**
|
337
|
+
* Default `target` lookup function.
|
338
|
+
* @param {Element} trigger
|
339
|
+
*/
|
340
|
+
|
341
|
+
}, {
|
342
|
+
key: "defaultTarget",
|
343
|
+
value: function defaultTarget(trigger) {
|
344
|
+
var selector = getAttributeValue('target', trigger);
|
345
|
+
|
346
|
+
if (selector) {
|
347
|
+
return document.querySelector(selector);
|
348
|
+
}
|
349
|
+
}
|
350
|
+
/**
|
351
|
+
* Allow fire programmatically a copy action
|
352
|
+
* @param {String|HTMLElement} target
|
353
|
+
* @param {Object} options
|
354
|
+
* @returns Text copied.
|
355
|
+
*/
|
356
|
+
|
357
|
+
}, {
|
358
|
+
key: "defaultText",
|
359
|
+
|
360
|
+
/**
|
361
|
+
* Default `text` lookup function.
|
362
|
+
* @param {Element} trigger
|
363
|
+
*/
|
364
|
+
value: function defaultText(trigger) {
|
365
|
+
return getAttributeValue('text', trigger);
|
366
|
+
}
|
367
|
+
/**
|
368
|
+
* Destroy lifecycle.
|
369
|
+
*/
|
370
|
+
|
371
|
+
}, {
|
372
|
+
key: "destroy",
|
373
|
+
value: function destroy() {
|
374
|
+
this.listener.destroy();
|
375
|
+
}
|
376
|
+
}], [{
|
377
|
+
key: "copy",
|
378
|
+
value: function copy(target) {
|
379
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
380
|
+
container: document.body
|
381
|
+
};
|
382
|
+
return actions_copy(target, options);
|
383
|
+
}
|
384
|
+
/**
|
385
|
+
* Allow fire programmatically a cut action
|
386
|
+
* @param {String|HTMLElement} target
|
387
|
+
* @returns Text cutted.
|
388
|
+
*/
|
389
|
+
|
390
|
+
}, {
|
391
|
+
key: "cut",
|
392
|
+
value: function cut(target) {
|
393
|
+
return actions_cut(target);
|
394
|
+
}
|
395
|
+
/**
|
396
|
+
* Returns the support of the given action, or all actions if no action is
|
397
|
+
* given.
|
398
|
+
* @param {String} [action]
|
399
|
+
*/
|
400
|
+
|
401
|
+
}, {
|
402
|
+
key: "isSupported",
|
403
|
+
value: function isSupported() {
|
404
|
+
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
|
405
|
+
var actions = typeof action === 'string' ? [action] : action;
|
406
|
+
var support = !!document.queryCommandSupported;
|
407
|
+
actions.forEach(function (action) {
|
408
|
+
support = support && !!document.queryCommandSupported(action);
|
409
|
+
});
|
410
|
+
return support;
|
411
|
+
}
|
412
|
+
}]);
|
413
|
+
|
414
|
+
return Clipboard;
|
415
|
+
}((tiny_emitter_default()));
|
416
|
+
|
417
|
+
/* harmony default export */ var clipboard = (Clipboard);
|
418
|
+
|
419
|
+
/***/ }),
|
420
|
+
|
421
|
+
/***/ 828:
|
422
|
+
/***/ (function(module) {
|
423
|
+
|
424
|
+
var DOCUMENT_NODE_TYPE = 9;
|
425
|
+
|
426
|
+
/**
|
427
|
+
* A polyfill for Element.matches()
|
428
|
+
*/
|
429
|
+
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
|
430
|
+
var proto = Element.prototype;
|
431
|
+
|
432
|
+
proto.matches = proto.matchesSelector ||
|
433
|
+
proto.mozMatchesSelector ||
|
434
|
+
proto.msMatchesSelector ||
|
435
|
+
proto.oMatchesSelector ||
|
436
|
+
proto.webkitMatchesSelector;
|
437
|
+
}
|
438
|
+
|
439
|
+
/**
|
440
|
+
* Finds the closest parent that matches a selector.
|
441
|
+
*
|
442
|
+
* @param {Element} element
|
443
|
+
* @param {String} selector
|
444
|
+
* @return {Function}
|
445
|
+
*/
|
446
|
+
function closest (element, selector) {
|
447
|
+
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
|
448
|
+
if (typeof element.matches === 'function' &&
|
449
|
+
element.matches(selector)) {
|
450
|
+
return element;
|
451
|
+
}
|
452
|
+
element = element.parentNode;
|
453
|
+
}
|
454
|
+
}
|
455
|
+
|
456
|
+
module.exports = closest;
|
457
|
+
|
458
|
+
|
459
|
+
/***/ }),
|
460
|
+
|
461
|
+
/***/ 438:
|
462
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
463
|
+
|
464
|
+
var closest = __webpack_require__(828);
|
465
|
+
|
466
|
+
/**
|
467
|
+
* Delegates event to a selector.
|
468
|
+
*
|
469
|
+
* @param {Element} element
|
470
|
+
* @param {String} selector
|
471
|
+
* @param {String} type
|
472
|
+
* @param {Function} callback
|
473
|
+
* @param {Boolean} useCapture
|
474
|
+
* @return {Object}
|
475
|
+
*/
|
476
|
+
function _delegate(element, selector, type, callback, useCapture) {
|
477
|
+
var listenerFn = listener.apply(this, arguments);
|
478
|
+
|
479
|
+
element.addEventListener(type, listenerFn, useCapture);
|
480
|
+
|
481
|
+
return {
|
482
|
+
destroy: function() {
|
483
|
+
element.removeEventListener(type, listenerFn, useCapture);
|
484
|
+
}
|
485
|
+
}
|
486
|
+
}
|
487
|
+
|
488
|
+
/**
|
489
|
+
* Delegates event to a selector.
|
490
|
+
*
|
491
|
+
* @param {Element|String|Array} [elements]
|
492
|
+
* @param {String} selector
|
493
|
+
* @param {String} type
|
494
|
+
* @param {Function} callback
|
495
|
+
* @param {Boolean} useCapture
|
496
|
+
* @return {Object}
|
497
|
+
*/
|
498
|
+
function delegate(elements, selector, type, callback, useCapture) {
|
499
|
+
// Handle the regular Element usage
|
500
|
+
if (typeof elements.addEventListener === 'function') {
|
501
|
+
return _delegate.apply(null, arguments);
|
502
|
+
}
|
503
|
+
|
504
|
+
// Handle Element-less usage, it defaults to global delegation
|
505
|
+
if (typeof type === 'function') {
|
506
|
+
// Use `document` as the first parameter, then apply arguments
|
507
|
+
// This is a short way to .unshift `arguments` without running into deoptimizations
|
508
|
+
return _delegate.bind(null, document).apply(null, arguments);
|
509
|
+
}
|
510
|
+
|
511
|
+
// Handle Selector-based usage
|
512
|
+
if (typeof elements === 'string') {
|
513
|
+
elements = document.querySelectorAll(elements);
|
514
|
+
}
|
515
|
+
|
516
|
+
// Handle Array-like based usage
|
517
|
+
return Array.prototype.map.call(elements, function (element) {
|
518
|
+
return _delegate(element, selector, type, callback, useCapture);
|
519
|
+
});
|
520
|
+
}
|
521
|
+
|
522
|
+
/**
|
523
|
+
* Finds closest match and invokes callback.
|
524
|
+
*
|
525
|
+
* @param {Element} element
|
526
|
+
* @param {String} selector
|
527
|
+
* @param {String} type
|
528
|
+
* @param {Function} callback
|
529
|
+
* @return {Function}
|
530
|
+
*/
|
531
|
+
function listener(element, selector, type, callback) {
|
532
|
+
return function(e) {
|
533
|
+
e.delegateTarget = closest(e.target, selector);
|
534
|
+
|
535
|
+
if (e.delegateTarget) {
|
536
|
+
callback.call(element, e);
|
537
|
+
}
|
538
|
+
}
|
539
|
+
}
|
540
|
+
|
541
|
+
module.exports = delegate;
|
542
|
+
|
543
|
+
|
544
|
+
/***/ }),
|
545
|
+
|
546
|
+
/***/ 879:
|
547
|
+
/***/ (function(__unused_webpack_module, exports) {
|
548
|
+
|
549
|
+
/**
|
550
|
+
* Check if argument is a HTML element.
|
551
|
+
*
|
552
|
+
* @param {Object} value
|
553
|
+
* @return {Boolean}
|
554
|
+
*/
|
555
|
+
exports.node = function(value) {
|
556
|
+
return value !== undefined
|
557
|
+
&& value instanceof HTMLElement
|
558
|
+
&& value.nodeType === 1;
|
559
|
+
};
|
560
|
+
|
561
|
+
/**
|
562
|
+
* Check if argument is a list of HTML elements.
|
563
|
+
*
|
564
|
+
* @param {Object} value
|
565
|
+
* @return {Boolean}
|
566
|
+
*/
|
567
|
+
exports.nodeList = function(value) {
|
568
|
+
var type = Object.prototype.toString.call(value);
|
569
|
+
|
570
|
+
return value !== undefined
|
571
|
+
&& (type === '[object NodeList]' || type === '[object HTMLCollection]')
|
572
|
+
&& ('length' in value)
|
573
|
+
&& (value.length === 0 || exports.node(value[0]));
|
574
|
+
};
|
575
|
+
|
576
|
+
/**
|
577
|
+
* Check if argument is a string.
|
578
|
+
*
|
579
|
+
* @param {Object} value
|
580
|
+
* @return {Boolean}
|
581
|
+
*/
|
582
|
+
exports.string = function(value) {
|
583
|
+
return typeof value === 'string'
|
584
|
+
|| value instanceof String;
|
585
|
+
};
|
586
|
+
|
587
|
+
/**
|
588
|
+
* Check if argument is a function.
|
589
|
+
*
|
590
|
+
* @param {Object} value
|
591
|
+
* @return {Boolean}
|
592
|
+
*/
|
593
|
+
exports.fn = function(value) {
|
594
|
+
var type = Object.prototype.toString.call(value);
|
595
|
+
|
596
|
+
return type === '[object Function]';
|
597
|
+
};
|
598
|
+
|
599
|
+
|
600
|
+
/***/ }),
|
601
|
+
|
602
|
+
/***/ 370:
|
603
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
604
|
+
|
605
|
+
var is = __webpack_require__(879);
|
606
|
+
var delegate = __webpack_require__(438);
|
607
|
+
|
608
|
+
/**
|
609
|
+
* Validates all params and calls the right
|
610
|
+
* listener function based on its target type.
|
611
|
+
*
|
612
|
+
* @param {String|HTMLElement|HTMLCollection|NodeList} target
|
613
|
+
* @param {String} type
|
614
|
+
* @param {Function} callback
|
615
|
+
* @return {Object}
|
616
|
+
*/
|
617
|
+
function listen(target, type, callback) {
|
618
|
+
if (!target && !type && !callback) {
|
619
|
+
throw new Error('Missing required arguments');
|
620
|
+
}
|
621
|
+
|
622
|
+
if (!is.string(type)) {
|
623
|
+
throw new TypeError('Second argument must be a String');
|
624
|
+
}
|
625
|
+
|
626
|
+
if (!is.fn(callback)) {
|
627
|
+
throw new TypeError('Third argument must be a Function');
|
628
|
+
}
|
629
|
+
|
630
|
+
if (is.node(target)) {
|
631
|
+
return listenNode(target, type, callback);
|
632
|
+
}
|
633
|
+
else if (is.nodeList(target)) {
|
634
|
+
return listenNodeList(target, type, callback);
|
635
|
+
}
|
636
|
+
else if (is.string(target)) {
|
637
|
+
return listenSelector(target, type, callback);
|
638
|
+
}
|
639
|
+
else {
|
640
|
+
throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
|
641
|
+
}
|
642
|
+
}
|
643
|
+
|
644
|
+
/**
|
645
|
+
* Adds an event listener to a HTML element
|
646
|
+
* and returns a remove listener function.
|
647
|
+
*
|
648
|
+
* @param {HTMLElement} node
|
649
|
+
* @param {String} type
|
650
|
+
* @param {Function} callback
|
651
|
+
* @return {Object}
|
652
|
+
*/
|
653
|
+
function listenNode(node, type, callback) {
|
654
|
+
node.addEventListener(type, callback);
|
655
|
+
|
656
|
+
return {
|
657
|
+
destroy: function() {
|
658
|
+
node.removeEventListener(type, callback);
|
659
|
+
}
|
660
|
+
}
|
661
|
+
}
|
662
|
+
|
663
|
+
/**
|
664
|
+
* Add an event listener to a list of HTML elements
|
665
|
+
* and returns a remove listener function.
|
666
|
+
*
|
667
|
+
* @param {NodeList|HTMLCollection} nodeList
|
668
|
+
* @param {String} type
|
669
|
+
* @param {Function} callback
|
670
|
+
* @return {Object}
|
671
|
+
*/
|
672
|
+
function listenNodeList(nodeList, type, callback) {
|
673
|
+
Array.prototype.forEach.call(nodeList, function(node) {
|
674
|
+
node.addEventListener(type, callback);
|
675
|
+
});
|
676
|
+
|
677
|
+
return {
|
678
|
+
destroy: function() {
|
679
|
+
Array.prototype.forEach.call(nodeList, function(node) {
|
680
|
+
node.removeEventListener(type, callback);
|
681
|
+
});
|
682
|
+
}
|
683
|
+
}
|
684
|
+
}
|
685
|
+
|
686
|
+
/**
|
687
|
+
* Add an event listener to a selector
|
688
|
+
* and returns a remove listener function.
|
689
|
+
*
|
690
|
+
* @param {String} selector
|
691
|
+
* @param {String} type
|
692
|
+
* @param {Function} callback
|
693
|
+
* @return {Object}
|
694
|
+
*/
|
695
|
+
function listenSelector(selector, type, callback) {
|
696
|
+
return delegate(document.body, selector, type, callback);
|
697
|
+
}
|
698
|
+
|
699
|
+
module.exports = listen;
|
700
|
+
|
701
|
+
|
702
|
+
/***/ }),
|
703
|
+
|
704
|
+
/***/ 817:
|
705
|
+
/***/ (function(module) {
|
706
|
+
|
707
|
+
function select(element) {
|
708
|
+
var selectedText;
|
709
|
+
|
710
|
+
if (element.nodeName === 'SELECT') {
|
711
|
+
element.focus();
|
712
|
+
|
713
|
+
selectedText = element.value;
|
714
|
+
}
|
715
|
+
else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
|
716
|
+
var isReadOnly = element.hasAttribute('readonly');
|
717
|
+
|
718
|
+
if (!isReadOnly) {
|
719
|
+
element.setAttribute('readonly', '');
|
720
|
+
}
|
721
|
+
|
722
|
+
element.select();
|
723
|
+
element.setSelectionRange(0, element.value.length);
|
724
|
+
|
725
|
+
if (!isReadOnly) {
|
726
|
+
element.removeAttribute('readonly');
|
727
|
+
}
|
728
|
+
|
729
|
+
selectedText = element.value;
|
730
|
+
}
|
731
|
+
else {
|
732
|
+
if (element.hasAttribute('contenteditable')) {
|
733
|
+
element.focus();
|
734
|
+
}
|
735
|
+
|
736
|
+
var selection = window.getSelection();
|
737
|
+
var range = document.createRange();
|
738
|
+
|
739
|
+
range.selectNodeContents(element);
|
740
|
+
selection.removeAllRanges();
|
741
|
+
selection.addRange(range);
|
742
|
+
|
743
|
+
selectedText = selection.toString();
|
744
|
+
}
|
745
|
+
|
746
|
+
return selectedText;
|
747
|
+
}
|
748
|
+
|
749
|
+
module.exports = select;
|
750
|
+
|
751
|
+
|
752
|
+
/***/ }),
|
753
|
+
|
754
|
+
/***/ 279:
|
755
|
+
/***/ (function(module) {
|
756
|
+
|
757
|
+
function E () {
|
758
|
+
// Keep this empty so it's easier to inherit from
|
759
|
+
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
|
760
|
+
}
|
761
|
+
|
762
|
+
E.prototype = {
|
763
|
+
on: function (name, callback, ctx) {
|
764
|
+
var e = this.e || (this.e = {});
|
765
|
+
|
766
|
+
(e[name] || (e[name] = [])).push({
|
767
|
+
fn: callback,
|
768
|
+
ctx: ctx
|
769
|
+
});
|
770
|
+
|
771
|
+
return this;
|
772
|
+
},
|
773
|
+
|
774
|
+
once: function (name, callback, ctx) {
|
775
|
+
var self = this;
|
776
|
+
function listener () {
|
777
|
+
self.off(name, listener);
|
778
|
+
callback.apply(ctx, arguments);
|
779
|
+
};
|
780
|
+
|
781
|
+
listener._ = callback
|
782
|
+
return this.on(name, listener, ctx);
|
783
|
+
},
|
784
|
+
|
785
|
+
emit: function (name) {
|
786
|
+
var data = [].slice.call(arguments, 1);
|
787
|
+
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
|
788
|
+
var i = 0;
|
789
|
+
var len = evtArr.length;
|
790
|
+
|
791
|
+
for (i; i < len; i++) {
|
792
|
+
evtArr[i].fn.apply(evtArr[i].ctx, data);
|
793
|
+
}
|
794
|
+
|
795
|
+
return this;
|
796
|
+
},
|
797
|
+
|
798
|
+
off: function (name, callback) {
|
799
|
+
var e = this.e || (this.e = {});
|
800
|
+
var evts = e[name];
|
801
|
+
var liveEvents = [];
|
802
|
+
|
803
|
+
if (evts && callback) {
|
804
|
+
for (var i = 0, len = evts.length; i < len; i++) {
|
805
|
+
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
|
806
|
+
liveEvents.push(evts[i]);
|
807
|
+
}
|
808
|
+
}
|
809
|
+
|
810
|
+
// Remove event from queue to prevent memory leak
|
811
|
+
// Suggested by https://github.com/lazd
|
812
|
+
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
|
813
|
+
|
814
|
+
(liveEvents.length)
|
815
|
+
? e[name] = liveEvents
|
816
|
+
: delete e[name];
|
817
|
+
|
818
|
+
return this;
|
819
|
+
}
|
820
|
+
};
|
821
|
+
|
822
|
+
module.exports = E;
|
823
|
+
module.exports.TinyEmitter = E;
|
824
|
+
|
825
|
+
|
826
|
+
/***/ })
|
827
|
+
|
828
|
+
/******/ });
|
829
|
+
/************************************************************************/
|
830
|
+
/******/ // The module cache
|
831
|
+
/******/ var __webpack_module_cache__ = {};
|
832
|
+
/******/
|
833
|
+
/******/ // The require function
|
834
|
+
/******/ function __webpack_require__(moduleId) {
|
835
|
+
/******/ // Check if module is in cache
|
836
|
+
/******/ if(__webpack_module_cache__[moduleId]) {
|
837
|
+
/******/ return __webpack_module_cache__[moduleId].exports;
|
838
|
+
/******/ }
|
839
|
+
/******/ // Create a new module (and put it into the cache)
|
840
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
841
|
+
/******/ // no module.id needed
|
842
|
+
/******/ // no module.loaded needed
|
843
|
+
/******/ exports: {}
|
844
|
+
/******/ };
|
845
|
+
/******/
|
846
|
+
/******/ // Execute the module function
|
847
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
848
|
+
/******/
|
849
|
+
/******/ // Return the exports of the module
|
850
|
+
/******/ return module.exports;
|
851
|
+
/******/ }
|
852
|
+
/******/
|
853
|
+
/************************************************************************/
|
854
|
+
/******/ /* webpack/runtime/compat get default export */
|
855
|
+
/******/ !function() {
|
856
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
857
|
+
/******/ __webpack_require__.n = function(module) {
|
858
|
+
/******/ var getter = module && module.__esModule ?
|
859
|
+
/******/ function() { return module['default']; } :
|
860
|
+
/******/ function() { return module; };
|
861
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
862
|
+
/******/ return getter;
|
863
|
+
/******/ };
|
864
|
+
/******/ }();
|
865
|
+
/******/
|
866
|
+
/******/ /* webpack/runtime/define property getters */
|
867
|
+
/******/ !function() {
|
868
|
+
/******/ // define getter functions for harmony exports
|
869
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
870
|
+
/******/ for(var key in definition) {
|
871
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
872
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
873
|
+
/******/ }
|
874
|
+
/******/ }
|
875
|
+
/******/ };
|
876
|
+
/******/ }();
|
877
|
+
/******/
|
878
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
879
|
+
/******/ !function() {
|
880
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
881
|
+
/******/ }();
|
882
|
+
/******/
|
883
|
+
/************************************************************************/
|
884
|
+
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
885
|
+
/******/ // startup
|
886
|
+
/******/ // Load entry module and return exports
|
887
|
+
/******/ return __webpack_require__(686);
|
888
|
+
/******/ })()
|
889
|
+
.default;
|
890
|
+
});
|