1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["tableDragger"] = factory();
- else
- root["tableDragger"] = factory();
- })(this, function() {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId])
- /******/ return installedModules[moduleId].exports;
- /******/
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ exports: {},
- /******/ id: moduleId,
- /******/ loaded: false
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.loaded = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(0);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- __webpack_require__(1);
-
- var _drag = __webpack_require__(5);
-
- var _drag2 = _interopRequireDefault(_drag);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var create = function create(el, options) {
- return _drag2.default.create(el, options);
- };
- exports.default = create;
-
- module.exports = create;
- /***/ },
- /* 1 */
- /***/ function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
-
- // load the styles
- var content = __webpack_require__(2);
- if(typeof content === 'string') content = [[module.id, content, '']];
- // add the styles to the DOM
- var update = __webpack_require__(4)(content, {});
- if(content.locals) module.exports = content.locals;
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!./../node_modules/css-loader/index.js!./main.css", function() {
- var newContent = require("!!./../node_modules/css-loader/index.js!./main.css");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ },
- /* 2 */
- /***/ function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(3)();
- // imports
-
-
- // module
- exports.push([module.id, ".sindu_dragger {\n list-style: none;\n margin: 0;\n padding: 0;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.sindu_handle {\n cursor: move;\n}\n\n.sindu_dragger table{\n background: red;\n}\n\n.sindu_dragger li {\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: inherit;\n}\n\n.sindu_dragger li table, .sindu_dragger tr, .sindu_dragger th, .sindu_dragger td {\n box-sizing: border-box;\n}\n\n.gu-mirror {\n list-style: none;\n}\n\n.sindu_dragger.sindu_column li {\n float: left;\n}\n\n.sindu_dragging .sindu_origin_table {\n visibility: hidden;\n}\n\n.gu-mirror {\n position: fixed !important;\n margin: 0 !important;\n z-index: 9999 !important;\n opacity: 0.8;\n}\n\n.gu-mirror li {\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: inherit;\n}\n\n.gu-mirror li table, .gu-mirror tr, .gu-mirror th, .gu-mirror td {\n box-sizing: border-box;\n}\n\n.gu-hide {\n display: none !important;\n}\n\n.gu-unselectable {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n}\n\n.gu-transit {\n opacity: 0.5;\n}\n", ""]);
-
- // exports
- /***/ },
- /* 3 */
- /***/ function(module, exports) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function() {
- var list = [];
-
- // return the list of modules as css string
- list.toString = function toString() {
- var result = [];
- for(var i = 0; i < this.length; i++) {
- var item = this[i];
- if(item[2]) {
- result.push("@media " + item[2] + "{" + item[1] + "}");
- } else {
- result.push(item[1]);
- }
- }
- return result.join("");
- };
-
- // import a list of modules into the list
- list.i = function(modules, mediaQuery) {
- if(typeof modules === "string")
- modules = [[null, modules, ""]];
- var alreadyImportedModules = {};
- for(var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if(typeof id === "number")
- alreadyImportedModules[id] = true;
- }
- for(i = 0; i < modules.length; i++) {
- var item = modules[i];
- // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
- if(mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if(mediaQuery) {
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
- }
- list.push(item);
- }
- }
- };
- return list;
- };
- /***/ },
- /* 4 */
- /***/ function(module, exports, __webpack_require__) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- var stylesInDom = {},
- memoize = function(fn) {
- var memo;
- return function () {
- if (typeof memo === "undefined") memo = fn.apply(this, arguments);
- return memo;
- };
- },
- isOldIE = memoize(function() {
- return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
- }),
- getHeadElement = memoize(function () {
- return document.head || document.getElementsByTagName("head")[0];
- }),
- singletonElement = null,
- singletonCounter = 0,
- styleElementsInsertedAtTop = [];
-
- module.exports = function(list, options) {
- if(false) {
- if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
- }
-
- options = options || {};
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
- // tags it will allow on a page
- if (typeof options.singleton === "undefined") options.singleton = isOldIE();
-
- // By default, add <style> tags to the bottom of <head>.
- if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
-
- var styles = listToStyles(list);
- addStylesToDom(styles, options);
-
- return function update(newList) {
- var mayRemove = [];
- for(var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- domStyle.refs--;
- mayRemove.push(domStyle);
- }
- if(newList) {
- var newStyles = listToStyles(newList);
- addStylesToDom(newStyles, options);
- }
- for(var i = 0; i < mayRemove.length; i++) {
- var domStyle = mayRemove[i];
- if(domStyle.refs === 0) {
- for(var j = 0; j < domStyle.parts.length; j++)
- domStyle.parts[j]();
- delete stylesInDom[domStyle.id];
- }
- }
- };
- }
-
- function addStylesToDom(styles, options) {
- for(var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- if(domStyle) {
- domStyle.refs++;
- for(var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j](item.parts[j]);
- }
- for(; j < item.parts.length; j++) {
- domStyle.parts.push(addStyle(item.parts[j], options));
- }
- } else {
- var parts = [];
- for(var j = 0; j < item.parts.length; j++) {
- parts.push(addStyle(item.parts[j], options));
- }
- stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
- }
- }
- }
-
- function listToStyles(list) {
- var styles = [];
- var newStyles = {};
- for(var i = 0; i < list.length; i++) {
- var item = list[i];
- var id = item[0];
- var css = item[1];
- var media = item[2];
- var sourceMap = item[3];
- var part = {css: css, media: media, sourceMap: sourceMap};
- if(!newStyles[id])
- styles.push(newStyles[id] = {id: id, parts: [part]});
- else
- newStyles[id].parts.push(part);
- }
- return styles;
- }
-
- function insertStyleElement(options, styleElement) {
- var head = getHeadElement();
- var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
- if (options.insertAt === "top") {
- if(!lastStyleElementInsertedAtTop) {
- head.insertBefore(styleElement, head.firstChild);
- } else if(lastStyleElementInsertedAtTop.nextSibling) {
- head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
- } else {
- head.appendChild(styleElement);
- }
- styleElementsInsertedAtTop.push(styleElement);
- } else if (options.insertAt === "bottom") {
- head.appendChild(styleElement);
- } else {
- throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
- }
- }
-
- function removeStyleElement(styleElement) {
- styleElement.parentNode.removeChild(styleElement);
- var idx = styleElementsInsertedAtTop.indexOf(styleElement);
- if(idx >= 0) {
- styleElementsInsertedAtTop.splice(idx, 1);
- }
- }
-
- function createStyleElement(options) {
- var styleElement = document.createElement("style");
- styleElement.type = "text/css";
- insertStyleElement(options, styleElement);
- return styleElement;
- }
-
- function createLinkElement(options) {
- var linkElement = document.createElement("link");
- linkElement.rel = "stylesheet";
- insertStyleElement(options, linkElement);
- return linkElement;
- }
-
- function addStyle(obj, options) {
- var styleElement, update, remove;
-
- if (options.singleton) {
- var styleIndex = singletonCounter++;
- styleElement = singletonElement || (singletonElement = createStyleElement(options));
- update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
- remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
- } else if(obj.sourceMap &&
- typeof URL === "function" &&
- typeof URL.createObjectURL === "function" &&
- typeof URL.revokeObjectURL === "function" &&
- typeof Blob === "function" &&
- typeof btoa === "function") {
- styleElement = createLinkElement(options);
- update = updateLink.bind(null, styleElement);
- remove = function() {
- removeStyleElement(styleElement);
- if(styleElement.href)
- URL.revokeObjectURL(styleElement.href);
- };
- } else {
- styleElement = createStyleElement(options);
- update = applyToTag.bind(null, styleElement);
- remove = function() {
- removeStyleElement(styleElement);
- };
- }
-
- update(obj);
-
- return function updateStyle(newObj) {
- if(newObj) {
- if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
- return;
- update(obj = newObj);
- } else {
- remove();
- }
- };
- }
-
- var replaceText = (function () {
- var textStore = [];
-
- return function (index, replacement) {
- textStore[index] = replacement;
- return textStore.filter(Boolean).join('\n');
- };
- })();
-
- function applyToSingletonTag(styleElement, index, remove, obj) {
- var css = remove ? "" : obj.css;
-
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = replaceText(index, css);
- } else {
- var cssNode = document.createTextNode(css);
- var childNodes = styleElement.childNodes;
- if (childNodes[index]) styleElement.removeChild(childNodes[index]);
- if (childNodes.length) {
- styleElement.insertBefore(cssNode, childNodes[index]);
- } else {
- styleElement.appendChild(cssNode);
- }
- }
- }
-
- function applyToTag(styleElement, obj) {
- var css = obj.css;
- var media = obj.media;
-
- if(media) {
- styleElement.setAttribute("media", media)
- }
-
- if(styleElement.styleSheet) {
- styleElement.styleSheet.cssText = css;
- } else {
- while(styleElement.firstChild) {
- styleElement.removeChild(styleElement.firstChild);
- }
- styleElement.appendChild(document.createTextNode(css));
- }
- }
-
- function updateLink(linkElement, obj) {
- var css = obj.css;
- var sourceMap = obj.sourceMap;
-
- if(sourceMap) {
- // http://stackoverflow.com/a/26603875
- css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
- }
-
- var blob = new Blob([css], { type: "text/css" });
-
- var oldSrc = linkElement.href;
-
- linkElement.href = URL.createObjectURL(blob);
-
- if(oldSrc)
- URL.revokeObjectURL(oldSrc);
- }
- /***/ },
- /* 5 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _typeof2 = __webpack_require__(6);
-
- var _typeof3 = _interopRequireDefault(_typeof2);
-
- var _getIterator2 = __webpack_require__(74);
-
- var _getIterator3 = _interopRequireDefault(_getIterator2);
-
- var _from = __webpack_require__(79);
-
- var _from2 = _interopRequireDefault(_from);
-
- var _assign = __webpack_require__(86);
-
- var _assign2 = _interopRequireDefault(_assign);
-
- var _classCallCheck2 = __webpack_require__(90);
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _createClass2 = __webpack_require__(91);
-
- var _createClass3 = _interopRequireDefault(_createClass2);
-
- var _draggableList = __webpack_require__(95);
-
- var _draggableList2 = _interopRequireDefault(_draggableList);
-
- var _classes = __webpack_require__(108);
-
- var _classes2 = _interopRequireDefault(_classes);
-
- var _util = __webpack_require__(109);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var Drag = function () {
- function Drag() {
- var _this = this;
-
- var table = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
- var userOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- (0, _classCallCheck3.default)(this, Drag);
-
- if (!checkIsTable(table)) {
- throw new TypeError('table-dragger: el must be TABLE HTMLElement, not ' + {}.toString.call(table));
- }
- if (!table.rows.length) {
- return;
- }
-
- var defaults = {
- mode: 'column',
- dragHandler: '',
- onlyBody: false,
- animation: 300
- };
- var options = this.options = (0, _assign2.default)({}, defaults, userOptions);
- var mode = options.mode;
-
- if (mode === 'free' && !options.dragHandler) {
- throw new Error('table-dragger: please specify dragHandler in free mode');
- }
-
- ['onTap', 'destroy', 'startBecauseMouseMoved', 'sortColumn', 'sortRow'].forEach(function (m) {
- _this[m] = _this[m].bind(_this);
- });
-
- var dragger = this.dragger = emitter({
- dragging: false,
- destroy: this.destroy
- });
- dragger.on('drop', function (from, to, originEl, realMode) {
- (realMode === 'column' ? _this.sortColumn : _this.sortRow)(from, to);
- });
-
- var handlers = void 0;
- if (options.dragHandler) {
- handlers = table.querySelectorAll(options.dragHandler);
- if (handlers && !handlers.length) {
- throw new Error('table-dragger: no element match dragHandler selector');
- }
- } else {
- handlers = mode === 'column' ? table.rows[0] ? table.rows[0].children : [] : (0, _from2.default)(table.rows).map(function (row) {
- return row.children[0];
- });
- }
- this.handlers = (0, _from2.default)(handlers);
- this.handlers.forEach(function (h) {
- h.classList.add(_classes2.default.handle);
- });
-
- table.classList.add(_classes2.default.originTable);
-
- this.tappedCoord = { x: 0, y: 0 };
- this.cellIndex = { x: 0, y: 0 };
- this.el = table;
- this.bindEvents();
- }
-
- (0, _createClass3.default)(Drag, [{
- key: 'bindEvents',
- value: function bindEvents() {
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = (0, _getIterator3.default)(this.handlers), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var e = _step.value;
-
- (0, _util.touchy)(e, 'add', 'mousedown', this.onTap);
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
- }
- }, {
- key: 'onTap',
- value: function onTap(event) {
- var _this2 = this;
-
- var target = event.target;
-
- while (target.nodeName !== 'TD' && target.nodeName !== 'TH') {
- target = target.parentElement;
- }
-
- var ignore = !isLeftButton(event) || event.metaKey || event.ctrlKey;
- if (ignore) {
- return;
- }
-
- this.cellIndex = { x: target.cellIndex, y: target.parentElement.rowIndex };
- this.tappedCoord = { x: event.clientX, y: event.clientY };
-
- this.eventualStart(false);
- (0, _util.touchy)(document, 'add', 'mouseup', function () {
- _this2.eventualStart(true);
- });
- }
- }, {
- key: 'startBecauseMouseMoved',
- value: function startBecauseMouseMoved(event) {
- var tappedCoord = this.tappedCoord,
- mode = this.options.mode;
-
- var gapX = Math.abs(event.clientX - tappedCoord.x);
- var gapY = Math.abs(event.clientY - tappedCoord.y);
- var isFree = mode === 'free';
- var realMode = mode;
-
- if (gapX === 0 && gapY === 0) {
- return;
- }
-
- if (isFree) {
- realMode = gapX < gapY ? 'row' : 'column';
- }
-
- var sortTable = new _draggableList2.default({
- mode: realMode,
- originTable: this
- });
- this.eventualStart(true);
-
- (0, _util.touchy)(document, 'add', 'mouseup', sortTable.destroy);
- }
- }, {
- key: 'eventualStart',
- value: function eventualStart(remove) {
- var op = remove ? 'remove' : 'add';
- (0, _util.touchy)(document, op, 'mousemove', this.startBecauseMouseMoved);
- }
- }, {
- key: 'destroy',
- value: function destroy() {
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
-
- try {
- for (var _iterator2 = (0, _getIterator3.default)(this.handlers), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var h = _step2.value;
-
- (0, _util.touchy)(h, 'remove', 'mousedown', this.onTap);
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
-
- this.el.classList.remove(_classes2.default.originTable);
- }
- }, {
- key: 'sortColumn',
- value: function sortColumn(from, to) {
- if (from === to) {
- return;
- }
- var table = this.el;
- (0, _from2.default)(table.rows).forEach(function (row) {
- (0, _util.sort)({ list: row.children, from: from, to: to });
- });
-
- var cols = table.querySelectorAll('col');
- if (cols.length) {
- (0, _util.sort)({ list: cols, from: from, to: to });
- }
- }
- }, {
- key: 'sortRow',
- value: function sortRow(from, to) {
- if (from === to) {
- return;
- }
- var table = this.el;
- var list = (0, _from2.default)(table.rows);
- (0, _util.sort)({ list: list, parent: list[to].parentElement, from: from, to: to });
- }
- }], [{
- key: 'create',
- value: function create(el, options) {
- var d = new Drag(el, options);
- return d && d.dragger;
- }
- }]);
- return Drag;
- }();
-
- Drag.version = '1.0';
- exports.default = Drag;
-
-
- function checkIsTable(ele) {
- return ele && (typeof ele === 'undefined' ? 'undefined' : (0, _typeof3.default)(ele)) === 'object' && 'nodeType' in ele && ele.nodeType === 1 && ele.cloneNode && ele.nodeName === 'TABLE';
- }
-
- function isLeftButton(e) {
- if ('touches' in e) {
- return e.touches.length === 1;
- }
- if ('buttons' in e) {
- return e.buttons === 1;
- }
- if ('button' in e) {
- return e.button === 0;
- }
- return false;
- }
-
- function emitter() {
- var thing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- var evt = {};
- thing.on = function (type, fn) {
- evt[type] = evt[type] || [];
- evt[type].push(fn);
- return thing;
- };
- thing.emit = function (type) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- if (!evt[type]) {
- return;
- }
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
-
- try {
- for (var _iterator3 = (0, _getIterator3.default)(evt[type]), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var fn = _step3.value;
-
- fn.apply(undefined, args);
- }
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion3 && _iterator3.return) {
- _iterator3.return();
- }
- } finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
- }
- }
- }
- };
- return thing;
- }
- /***/ },
- /* 6 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- exports.__esModule = true;
-
- var _iterator = __webpack_require__(7);
-
- var _iterator2 = _interopRequireDefault(_iterator);
-
- var _symbol = __webpack_require__(58);
-
- var _symbol2 = _interopRequireDefault(_symbol);
-
- var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
- return typeof obj === "undefined" ? "undefined" : _typeof(obj);
- } : function (obj) {
- return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
- };
- /***/ },
- /* 7 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(8), __esModule: true };
- /***/ },
- /* 8 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(9);
- __webpack_require__(53);
- module.exports = __webpack_require__(57).f('iterator');
- /***/ },
- /* 9 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var $at = __webpack_require__(10)(true);
-
- // 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(13)(String, 'String', function(iterated){
- this._t = String(iterated); // target
- this._i = 0; // next index
- // 21.1.5.2.1 %StringIteratorPrototype%.next()
- }, function(){
- var O = this._t
- , index = this._i
- , point;
- if(index >= O.length)return {value: undefined, done: true};
- point = $at(O, index);
- this._i += point.length;
- return {value: point, done: false};
- });
- /***/ },
- /* 10 */
- /***/ function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(11)
- , defined = __webpack_require__(12);
- // true -> String#at
- // false -> String#codePointAt
- module.exports = function(TO_STRING){
- return function(that, pos){
- var s = String(defined(that))
- , i = toInteger(pos)
- , l = s.length
- , a, b;
- if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
- };
- /***/ },
- /* 11 */
- /***/ function(module, exports) {
- // 7.1.4 ToInteger
- var ceil = Math.ceil
- , floor = Math.floor;
- module.exports = function(it){
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
- };
- /***/ },
- /* 12 */
- /***/ function(module, exports) {
- // 7.2.1 RequireObjectCoercible(argument)
- module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
- return it;
- };
- /***/ },
- /* 13 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var LIBRARY = __webpack_require__(14)
- , $export = __webpack_require__(15)
- , redefine = __webpack_require__(30)
- , hide = __webpack_require__(20)
- , has = __webpack_require__(31)
- , Iterators = __webpack_require__(32)
- , $iterCreate = __webpack_require__(33)
- , setToStringTag = __webpack_require__(49)
- , getPrototypeOf = __webpack_require__(51)
- , ITERATOR = __webpack_require__(50)('iterator')
- , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
- , FF_ITERATOR = '@@iterator'
- , KEYS = 'keys'
- , VALUES = 'values';
-
- var returnThis = function(){ return this; };
-
- module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
- $iterCreate(Constructor, NAME, next);
- var getMethod = function(kind){
- if(!BUGGY && kind in proto)return proto[kind];
- switch(kind){
- case KEYS: return function keys(){ return new Constructor(this, kind); };
- case VALUES: return function values(){ return new Constructor(this, kind); };
- } return function entries(){ return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator'
- , DEF_VALUES = DEFAULT == VALUES
- , VALUES_BUG = false
- , proto = Base.prototype
- , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
- , $default = $native || getMethod(DEFAULT)
- , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
- , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
- , methods, key, IteratorPrototype;
- // Fix native
- if($anyNative){
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
- if(IteratorPrototype !== Object.prototype){
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if(DEF_VALUES && $native && $native.name !== VALUES){
- VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
- }
- // Define iterator
- if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if(DEFAULT){
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if(FORCED)for(key in methods){
- if(!(key in proto))redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
- };
- /***/ },
- /* 14 */
- /***/ function(module, exports) {
- module.exports = true;
- /***/ },
- /* 15 */
- /***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(16)
- , core = __webpack_require__(17)
- , ctx = __webpack_require__(18)
- , hide = __webpack_require__(20)
- , PROTOTYPE = 'prototype';
-
- var $export = function(type, name, source){
- var IS_FORCED = type & $export.F
- , IS_GLOBAL = type & $export.G
- , IS_STATIC = type & $export.S
- , IS_PROTO = type & $export.P
- , IS_BIND = type & $export.B
- , IS_WRAP = type & $export.W
- , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , expProto = exports[PROTOTYPE]
- , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
- , key, own, out;
- if(IS_GLOBAL)source = name;
- for(key in source){
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- if(own && key in exports)continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function(C){
- var F = function(a, b, c){
- if(this instanceof C){
- switch(arguments.length){
- case 0: return new C;
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if(IS_PROTO){
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
- }
- }
- };
- // type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
- module.exports = $export;
- /***/ },
- /* 16 */
- /***/ function(module, exports) {
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
- if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
- /***/ },
- /* 17 */
- /***/ function(module, exports) {
- var core = module.exports = {version: '2.4.0'};
- if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
- /***/ },
- /* 18 */
- /***/ function(module, exports, __webpack_require__) {
- // optional / simple context binding
- var aFunction = __webpack_require__(19);
- module.exports = function(fn, that, length){
- aFunction(fn);
- if(that === undefined)return fn;
- switch(length){
- case 1: return function(a){
- return fn.call(that, a);
- };
- case 2: return function(a, b){
- return fn.call(that, a, b);
- };
- case 3: return function(a, b, c){
- return fn.call(that, a, b, c);
- };
- }
- return function(/* ...args */){
- return fn.apply(that, arguments);
- };
- };
- /***/ },
- /* 19 */
- /***/ function(module, exports) {
- module.exports = function(it){
- if(typeof it != 'function')throw TypeError(it + ' is not a function!');
- return it;
- };
- /***/ },
- /* 20 */
- /***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(21)
- , createDesc = __webpack_require__(29);
- module.exports = __webpack_require__(25) ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
- } : function(object, key, value){
- object[key] = value;
- return object;
- };
- /***/ },
- /* 21 */
- /***/ function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(22)
- , IE8_DOM_DEFINE = __webpack_require__(24)
- , toPrimitive = __webpack_require__(28)
- , dP = Object.defineProperty;
-
- exports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
- };
- /***/ },
- /* 22 */
- /***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(23);
- module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
- };
- /***/ },
- /* 23 */
- /***/ function(module, exports) {
- module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
- };
- /***/ },
- /* 24 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = !__webpack_require__(25) && !__webpack_require__(26)(function(){
- return Object.defineProperty(__webpack_require__(27)('div'), 'a', {get: function(){ return 7; }}).a != 7;
- });
- /***/ },
- /* 25 */
- /***/ function(module, exports, __webpack_require__) {
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(26)(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
- });
- /***/ },
- /* 26 */
- /***/ function(module, exports) {
- module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
- };
- /***/ },
- /* 27 */
- /***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(23)
- , document = __webpack_require__(16).document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
- module.exports = function(it){
- return is ? document.createElement(it) : {};
- };
- /***/ },
- /* 28 */
- /***/ function(module, exports, __webpack_require__) {
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__(23);
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
- };
- /***/ },
- /* 29 */
- /***/ function(module, exports) {
- module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
- };
- /***/ },
- /* 30 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(20);
- /***/ },
- /* 31 */
- /***/ function(module, exports) {
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
- };
- /***/ },
- /* 32 */
- /***/ function(module, exports) {
- module.exports = {};
- /***/ },
- /* 33 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var create = __webpack_require__(34)
- , descriptor = __webpack_require__(29)
- , setToStringTag = __webpack_require__(49)
- , IteratorPrototype = {};
-
- // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(20)(IteratorPrototype, __webpack_require__(50)('iterator'), function(){ return this; });
-
- module.exports = function(Constructor, NAME, next){
- Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
- setToStringTag(Constructor, NAME + ' Iterator');
- };
- /***/ },
- /* 34 */
- /***/ function(module, exports, __webpack_require__) {
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(22)
- , dPs = __webpack_require__(35)
- , enumBugKeys = __webpack_require__(47)
- , IE_PROTO = __webpack_require__(44)('IE_PROTO')
- , Empty = function(){ /* empty */ }
- , PROTOTYPE = 'prototype';
-
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function(){
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(27)('iframe')
- , i = enumBugKeys.length
- , lt = '<'
- , gt = '>'
- , iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(48).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
-
- module.exports = Object.create || function create(O, Properties){
- var result;
- if(O !== null){
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty;
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
- };
- /***/ },
- /* 35 */
- /***/ function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(21)
- , anObject = __webpack_require__(22)
- , getKeys = __webpack_require__(36);
-
- module.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties){
- anObject(O);
- var keys = getKeys(Properties)
- , length = keys.length
- , i = 0
- , P;
- while(length > i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
- };
- /***/ },
- /* 36 */
- /***/ function(module, exports, __webpack_require__) {
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(37)
- , enumBugKeys = __webpack_require__(47);
-
- module.exports = Object.keys || function keys(O){
- return $keys(O, enumBugKeys);
- };
- /***/ },
- /* 37 */
- /***/ function(module, exports, __webpack_require__) {
- var has = __webpack_require__(31)
- , toIObject = __webpack_require__(38)
- , arrayIndexOf = __webpack_require__(41)(false)
- , IE_PROTO = __webpack_require__(44)('IE_PROTO');
-
- module.exports = function(object, names){
- var O = toIObject(object)
- , i = 0
- , result = []
- , key;
- for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while(names.length > i)if(has(O, key = names[i++])){
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
- };
- /***/ },
- /* 38 */
- /***/ function(module, exports, __webpack_require__) {
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(39)
- , defined = __webpack_require__(12);
- module.exports = function(it){
- return IObject(defined(it));
- };
- /***/ },
- /* 39 */
- /***/ function(module, exports, __webpack_require__) {
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(40);
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
- /***/ },
- /* 40 */
- /***/ function(module, exports) {
- var toString = {}.toString;
-
- module.exports = function(it){
- return toString.call(it).slice(8, -1);
- };
- /***/ },
- /* 41 */
- /***/ function(module, exports, __webpack_require__) {
- // false -> Array#indexOf
- // true -> Array#includes
- var toIObject = __webpack_require__(38)
- , toLength = __webpack_require__(42)
- , toIndex = __webpack_require__(43);
- module.exports = function(IS_INCLUDES){
- return function($this, el, fromIndex){
- var O = toIObject($this)
- , length = toLength(O.length)
- , index = toIndex(fromIndex, length)
- , value;
- // Array#includes uses SameValueZero equality algorithm
- if(IS_INCLUDES && el != el)while(length > index){
- value = O[index++];
- if(value != value)return true;
- // Array#toIndex ignores holes, Array#includes - not
- } else for(;length > index; index++)if(IS_INCLUDES || index in O){
- if(O[index] === el)return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
- };
- /***/ },
- /* 42 */
- /***/ function(module, exports, __webpack_require__) {
- // 7.1.15 ToLength
- var toInteger = __webpack_require__(11)
- , min = Math.min;
- module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
- };
- /***/ },
- /* 43 */
- /***/ function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(11)
- , max = Math.max
- , min = Math.min;
- module.exports = function(index, length){
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
- };
- /***/ },
- /* 44 */
- /***/ function(module, exports, __webpack_require__) {
- var shared = __webpack_require__(45)('keys')
- , uid = __webpack_require__(46);
- module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
- };
- /***/ },
- /* 45 */
- /***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(16)
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
- module.exports = function(key){
- return store[key] || (store[key] = {});
- };
- /***/ },
- /* 46 */
- /***/ function(module, exports) {
- var id = 0
- , px = Math.random();
- module.exports = function(key){
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
- };
- /***/ },
- /* 47 */
- /***/ function(module, exports) {
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
- /***/ },
- /* 48 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(16).document && document.documentElement;
- /***/ },
- /* 49 */
- /***/ function(module, exports, __webpack_require__) {
- var def = __webpack_require__(21).f
- , has = __webpack_require__(31)
- , TAG = __webpack_require__(50)('toStringTag');
-
- module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
- };
- /***/ },
- /* 50 */
- /***/ function(module, exports, __webpack_require__) {
- var store = __webpack_require__(45)('wks')
- , uid = __webpack_require__(46)
- , Symbol = __webpack_require__(16).Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
-
- var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
- };
-
- $exports.store = store;
- /***/ },
- /* 51 */
- /***/ function(module, exports, __webpack_require__) {
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__(31)
- , toObject = __webpack_require__(52)
- , IE_PROTO = __webpack_require__(44)('IE_PROTO')
- , ObjectProto = Object.prototype;
-
- module.exports = Object.getPrototypeOf || function(O){
- O = toObject(O);
- if(has(O, IE_PROTO))return O[IE_PROTO];
- if(typeof O.constructor == 'function' && O instanceof O.constructor){
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
- };
- /***/ },
- /* 52 */
- /***/ function(module, exports, __webpack_require__) {
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(12);
- module.exports = function(it){
- return Object(defined(it));
- };
- /***/ },
- /* 53 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(54);
- var global = __webpack_require__(16)
- , hide = __webpack_require__(20)
- , Iterators = __webpack_require__(32)
- , TO_STRING_TAG = __webpack_require__(50)('toStringTag');
-
- for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
- var NAME = collections[i]
- , Collection = global[NAME]
- , proto = Collection && Collection.prototype;
- if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = Iterators.Array;
- }
- /***/ },
- /* 54 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var addToUnscopables = __webpack_require__(55)
- , step = __webpack_require__(56)
- , Iterators = __webpack_require__(32)
- , toIObject = __webpack_require__(38);
-
- // 22.1.3.4 Array.prototype.entries()
- // 22.1.3.13 Array.prototype.keys()
- // 22.1.3.29 Array.prototype.values()
- // 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__(13)(Array, 'Array', function(iterated, kind){
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
- }, function(){
- var O = this._t
- , kind = this._k
- , index = this._i++;
- if(!O || index >= O.length){
- this._t = undefined;
- return step(1);
- }
- if(kind == 'keys' )return step(0, index);
- if(kind == 'values')return step(0, O[index]);
- return step(0, [index, O[index]]);
- }, 'values');
-
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
- Iterators.Arguments = Iterators.Array;
-
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
- /***/ },
- /* 55 */
- /***/ function(module, exports) {
- module.exports = function(){ /* empty */ };
- /***/ },
- /* 56 */
- /***/ function(module, exports) {
- module.exports = function(done, value){
- return {value: value, done: !!done};
- };
- /***/ },
- /* 57 */
- /***/ function(module, exports, __webpack_require__) {
- exports.f = __webpack_require__(50);
- /***/ },
- /* 58 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(59), __esModule: true };
- /***/ },
- /* 59 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(60);
- __webpack_require__(71);
- __webpack_require__(72);
- __webpack_require__(73);
- module.exports = __webpack_require__(17).Symbol;
- /***/ },
- /* 60 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- // ECMAScript 6 symbols shim
- var global = __webpack_require__(16)
- , has = __webpack_require__(31)
- , DESCRIPTORS = __webpack_require__(25)
- , $export = __webpack_require__(15)
- , redefine = __webpack_require__(30)
- , META = __webpack_require__(61).KEY
- , $fails = __webpack_require__(26)
- , shared = __webpack_require__(45)
- , setToStringTag = __webpack_require__(49)
- , uid = __webpack_require__(46)
- , wks = __webpack_require__(50)
- , wksExt = __webpack_require__(57)
- , wksDefine = __webpack_require__(62)
- , keyOf = __webpack_require__(63)
- , enumKeys = __webpack_require__(64)
- , isArray = __webpack_require__(67)
- , anObject = __webpack_require__(22)
- , toIObject = __webpack_require__(38)
- , toPrimitive = __webpack_require__(28)
- , createDesc = __webpack_require__(29)
- , _create = __webpack_require__(34)
- , gOPNExt = __webpack_require__(68)
- , $GOPD = __webpack_require__(70)
- , $DP = __webpack_require__(21)
- , $keys = __webpack_require__(36)
- , gOPD = $GOPD.f
- , dP = $DP.f
- , gOPN = gOPNExt.f
- , $Symbol = global.Symbol
- , $JSON = global.JSON
- , _stringify = $JSON && $JSON.stringify
- , PROTOTYPE = 'prototype'
- , HIDDEN = wks('_hidden')
- , TO_PRIMITIVE = wks('toPrimitive')
- , isEnum = {}.propertyIsEnumerable
- , SymbolRegistry = shared('symbol-registry')
- , AllSymbols = shared('symbols')
- , OPSymbols = shared('op-symbols')
- , ObjectProto = Object[PROTOTYPE]
- , USE_NATIVE = typeof $Symbol == 'function'
- , QObject = global.QObject;
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
- var setSymbolDesc = DESCRIPTORS && $fails(function(){
- return _create(dP({}, 'a', {
- get: function(){ return dP(this, 'a', {value: 7}).a; }
- })).a != 7;
- }) ? function(it, key, D){
- var protoDesc = gOPD(ObjectProto, key);
- if(protoDesc)delete ObjectProto[key];
- dP(it, key, D);
- if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
- } : dP;
-
- var wrap = function(tag){
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
- };
-
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
- return typeof it == 'symbol';
- } : function(it){
- return it instanceof $Symbol;
- };
-
- var $defineProperty = function defineProperty(it, key, D){
- if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if(has(AllSymbols, key)){
- if(!D.enumerable){
- if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
- D = _create(D, {enumerable: createDesc(0, false)});
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
- };
- var $defineProperties = function defineProperties(it, P){
- anObject(it);
- var keys = enumKeys(P = toIObject(P))
- , i = 0
- , l = keys.length
- , key;
- while(l > i)$defineProperty(it, key = keys[i++], P[key]);
- return it;
- };
- var $create = function create(it, P){
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
- };
- var $propertyIsEnumerable = function propertyIsEnumerable(key){
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
- };
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
- it = toIObject(it);
- key = toPrimitive(key, true);
- if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
- var D = gOPD(it, key);
- if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
- return D;
- };
- var $getOwnPropertyNames = function getOwnPropertyNames(it){
- var names = gOPN(toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
- } return result;
- };
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
- var IS_OP = it === ObjectProto
- , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i){
- if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
- } return result;
- };
-
- // 19.4.1.1 Symbol([description])
- if(!USE_NATIVE){
- $Symbol = function Symbol(){
- if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function(value){
- if(this === ObjectProto)$set.call(OPSymbols, value);
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- };
- if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString(){
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- __webpack_require__(69).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(66).f = $propertyIsEnumerable;
- __webpack_require__(65).f = $getOwnPropertySymbols;
-
- if(DESCRIPTORS && !__webpack_require__(14)){
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
-
- wksExt.f = function(name){
- return wrap(wks(name));
- }
- }
-
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
-
- for(var symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
- ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
-
- for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
-
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function(key){
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(key){
- if(isSymbol(key))return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
- },
- useSetter: function(){ setter = true; },
- useSimple: function(){ setter = false; }
- });
-
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
- });
-
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
- })), 'JSON', {
- stringify: function stringify(it){
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
- var args = [it]
- , i = 1
- , replacer, $replacer;
- while(arguments.length > i)args.push(arguments[i++]);
- replacer = args[1];
- if(typeof replacer == 'function')$replacer = replacer;
- if($replacer || !isArray(replacer))replacer = function(key, value){
- if($replacer)value = $replacer.call(this, key, value);
- if(!isSymbol(value))return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- }
- });
-
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
- setToStringTag($Symbol, 'Symbol');
- // 20.2.1.9 Math[@@toStringTag]
- setToStringTag(Math, 'Math', true);
- // 24.3.3 JSON[@@toStringTag]
- setToStringTag(global.JSON, 'JSON', true);
- /***/ },
- /* 61 */
- /***/ function(module, exports, __webpack_require__) {
- var META = __webpack_require__(46)('meta')
- , isObject = __webpack_require__(23)
- , has = __webpack_require__(31)
- , setDesc = __webpack_require__(21).f
- , id = 0;
- var isExtensible = Object.isExtensible || function(){
- return true;
- };
- var FREEZE = !__webpack_require__(26)(function(){
- return isExtensible(Object.preventExtensions({}));
- });
- var setMeta = function(it){
- setDesc(it, META, {value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- }});
- };
- var fastKey = function(it, create){
- // return primitive with prefix
- if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return 'F';
- // not necessary to add metadata
- if(!create)return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
- };
- var getWeak = function(it, create){
- if(!has(it, META)){
- // can't set metadata to uncaught frozen object
- if(!isExtensible(it))return true;
- // not necessary to add metadata
- if(!create)return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
- };
- // add metadata on freeze-family methods calling
- var onFreeze = function(it){
- if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
- return it;
- };
- var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
- };
- /***/ },
- /* 62 */
- /***/ function(module, exports, __webpack_require__) {
- var global = __webpack_require__(16)
- , core = __webpack_require__(17)
- , LIBRARY = __webpack_require__(14)
- , wksExt = __webpack_require__(57)
- , defineProperty = __webpack_require__(21).f;
- module.exports = function(name){
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
- };
- /***/ },
- /* 63 */
- /***/ function(module, exports, __webpack_require__) {
- var getKeys = __webpack_require__(36)
- , toIObject = __webpack_require__(38);
- module.exports = function(object, el){
- var O = toIObject(object)
- , keys = getKeys(O)
- , length = keys.length
- , index = 0
- , key;
- while(length > index)if(O[key = keys[index++]] === el)return key;
- };
- /***/ },
- /* 64 */
- /***/ function(module, exports, __webpack_require__) {
- // all enumerable object keys, includes symbols
- var getKeys = __webpack_require__(36)
- , gOPS = __webpack_require__(65)
- , pIE = __webpack_require__(66);
- module.exports = function(it){
- var result = getKeys(it)
- , getSymbols = gOPS.f;
- if(getSymbols){
- var symbols = getSymbols(it)
- , isEnum = pIE.f
- , i = 0
- , key;
- while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
- } return result;
- };
- /***/ },
- /* 65 */
- /***/ function(module, exports) {
- exports.f = Object.getOwnPropertySymbols;
- /***/ },
- /* 66 */
- /***/ function(module, exports) {
- exports.f = {}.propertyIsEnumerable;
- /***/ },
- /* 67 */
- /***/ function(module, exports, __webpack_require__) {
- // 7.2.2 IsArray(argument)
- var cof = __webpack_require__(40);
- module.exports = Array.isArray || function isArray(arg){
- return cof(arg) == 'Array';
- };
- /***/ },
- /* 68 */
- /***/ function(module, exports, __webpack_require__) {
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- var toIObject = __webpack_require__(38)
- , gOPN = __webpack_require__(69).f
- , toString = {}.toString;
-
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
-
- var getWindowNames = function(it){
- try {
- return gOPN(it);
- } catch(e){
- return windowNames.slice();
- }
- };
-
- module.exports.f = function getOwnPropertyNames(it){
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
- };
- /***/ },
- /* 69 */
- /***/ function(module, exports, __webpack_require__) {
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__(37)
- , hiddenKeys = __webpack_require__(47).concat('length', 'prototype');
-
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
- return $keys(O, hiddenKeys);
- };
- /***/ },
- /* 70 */
- /***/ function(module, exports, __webpack_require__) {
- var pIE = __webpack_require__(66)
- , createDesc = __webpack_require__(29)
- , toIObject = __webpack_require__(38)
- , toPrimitive = __webpack_require__(28)
- , has = __webpack_require__(31)
- , IE8_DOM_DEFINE = __webpack_require__(24)
- , gOPD = Object.getOwnPropertyDescriptor;
-
- exports.f = __webpack_require__(25) ? gOPD : function getOwnPropertyDescriptor(O, P){
- O = toIObject(O);
- P = toPrimitive(P, true);
- if(IE8_DOM_DEFINE)try {
- return gOPD(O, P);
- } catch(e){ /* empty */ }
- if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
- };
- /***/ },
- /* 71 */
- /***/ function(module, exports) {
- /***/ },
- /* 72 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(62)('asyncIterator');
- /***/ },
- /* 73 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(62)('observable');
- /***/ },
- /* 74 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(75), __esModule: true };
- /***/ },
- /* 75 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(53);
- __webpack_require__(9);
- module.exports = __webpack_require__(76);
- /***/ },
- /* 76 */
- /***/ function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(22)
- , get = __webpack_require__(77);
- module.exports = __webpack_require__(17).getIterator = function(it){
- var iterFn = get(it);
- if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
- return anObject(iterFn.call(it));
- };
- /***/ },
- /* 77 */
- /***/ function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(78)
- , ITERATOR = __webpack_require__(50)('iterator')
- , Iterators = __webpack_require__(32);
- module.exports = __webpack_require__(17).getIteratorMethod = function(it){
- if(it != undefined)return it[ITERATOR]
- || it['@@iterator']
- || Iterators[classof(it)];
- };
- /***/ },
- /* 78 */
- /***/ function(module, exports, __webpack_require__) {
- // getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__(40)
- , TAG = __webpack_require__(50)('toStringTag')
- // ES3 wrong here
- , ARG = cof(function(){ return arguments; }()) == 'Arguments';
-
- // fallback for IE11 Script Access Denied error
- var tryGet = function(it, key){
- try {
- return it[key];
- } catch(e){ /* empty */ }
- };
-
- module.exports = function(it){
- var O, T, B;
- return it === undefined ? 'Undefined' : it === null ? 'Null'
- // @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
- // builtinTag case
- : ARG ? cof(O)
- // ES3 arguments fallback
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
- };
- /***/ },
- /* 79 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(80), __esModule: true };
- /***/ },
- /* 80 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(9);
- __webpack_require__(81);
- module.exports = __webpack_require__(17).Array.from;
- /***/ },
- /* 81 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var ctx = __webpack_require__(18)
- , $export = __webpack_require__(15)
- , toObject = __webpack_require__(52)
- , call = __webpack_require__(82)
- , isArrayIter = __webpack_require__(83)
- , toLength = __webpack_require__(42)
- , createProperty = __webpack_require__(84)
- , getIterFn = __webpack_require__(77);
-
- $export($export.S + $export.F * !__webpack_require__(85)(function(iter){ Array.from(iter); }), 'Array', {
- // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
- from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
- var O = toObject(arrayLike)
- , C = typeof this == 'function' ? this : Array
- , aLen = arguments.length
- , mapfn = aLen > 1 ? arguments[1] : undefined
- , mapping = mapfn !== undefined
- , index = 0
- , iterFn = getIterFn(O)
- , length, result, step, iterator;
- if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
- // if object isn't iterable or it's array with default iterator - use simple case
- if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
- for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
- }
- } else {
- length = toLength(O.length);
- for(result = new C(length); length > index; index++){
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
- }
- }
- result.length = index;
- return result;
- }
- });
- /***/ },
- /* 82 */
- /***/ function(module, exports, __webpack_require__) {
- // call something on iterator step with safe closing on error
- var anObject = __webpack_require__(22);
- module.exports = function(iterator, fn, value, entries){
- try {
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch(e){
- var ret = iterator['return'];
- if(ret !== undefined)anObject(ret.call(iterator));
- throw e;
- }
- };
- /***/ },
- /* 83 */
- /***/ function(module, exports, __webpack_require__) {
- // check on default Array iterator
- var Iterators = __webpack_require__(32)
- , ITERATOR = __webpack_require__(50)('iterator')
- , ArrayProto = Array.prototype;
-
- module.exports = function(it){
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
- };
- /***/ },
- /* 84 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- var $defineProperty = __webpack_require__(21)
- , createDesc = __webpack_require__(29);
-
- module.exports = function(object, index, value){
- if(index in object)$defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
- };
- /***/ },
- /* 85 */
- /***/ function(module, exports, __webpack_require__) {
- var ITERATOR = __webpack_require__(50)('iterator')
- , SAFE_CLOSING = false;
-
- try {
- var riter = [7][ITERATOR]();
- riter['return'] = function(){ SAFE_CLOSING = true; };
- Array.from(riter, function(){ throw 2; });
- } catch(e){ /* empty */ }
-
- module.exports = function(exec, skipClosing){
- if(!skipClosing && !SAFE_CLOSING)return false;
- var safe = false;
- try {
- var arr = [7]
- , iter = arr[ITERATOR]();
- iter.next = function(){ return {done: safe = true}; };
- arr[ITERATOR] = function(){ return iter; };
- exec(arr);
- } catch(e){ /* empty */ }
- return safe;
- };
- /***/ },
- /* 86 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(87), __esModule: true };
- /***/ },
- /* 87 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(88);
- module.exports = __webpack_require__(17).Object.assign;
- /***/ },
- /* 88 */
- /***/ function(module, exports, __webpack_require__) {
- // 19.1.3.1 Object.assign(target, source)
- var $export = __webpack_require__(15);
-
- $export($export.S + $export.F, 'Object', {assign: __webpack_require__(89)});
- /***/ },
- /* 89 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
- // 19.1.2.1 Object.assign(target, source, ...)
- var getKeys = __webpack_require__(36)
- , gOPS = __webpack_require__(65)
- , pIE = __webpack_require__(66)
- , toObject = __webpack_require__(52)
- , IObject = __webpack_require__(39)
- , $assign = Object.assign;
-
- // should work with symbols and should have deterministic property order (V8 bug)
- module.exports = !$assign || __webpack_require__(26)(function(){
- var A = {}
- , B = {}
- , S = Symbol()
- , K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function(k){ B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
- }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
- var T = toObject(target)
- , aLen = arguments.length
- , index = 1
- , getSymbols = gOPS.f
- , isEnum = pIE.f;
- while(aLen > index){
- var S = IObject(arguments[index++])
- , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
- , length = keys.length
- , j = 0
- , key;
- while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
- } return T;
- } : $assign;
- /***/ },
- /* 90 */
- /***/ function(module, exports) {
- "use strict";
-
- exports.__esModule = true;
-
- exports.default = function (instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- };
- /***/ },
- /* 91 */
- /***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- exports.__esModule = true;
-
- var _defineProperty = __webpack_require__(92);
-
- var _defineProperty2 = _interopRequireDefault(_defineProperty);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- exports.default = function () {
- 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;
- (0, _defineProperty2.default)(target, descriptor.key, descriptor);
- }
- }
-
- return function (Constructor, protoProps, staticProps) {
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
- if (staticProps) defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
- /***/ },
- /* 92 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(93), __esModule: true };
- /***/ },
- /* 93 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(94);
- var $Object = __webpack_require__(17).Object;
- module.exports = function defineProperty(it, key, desc){
- return $Object.defineProperty(it, key, desc);
- };
- /***/ },
- /* 94 */
- /***/ function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(15);
- // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
- $export($export.S + $export.F * !__webpack_require__(25), 'Object', {defineProperty: __webpack_require__(21).f});
- /***/ },
- /* 95 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _from = __webpack_require__(79);
-
- var _from2 = _interopRequireDefault(_from);
-
- var _classCallCheck2 = __webpack_require__(90);
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _createClass2 = __webpack_require__(91);
-
- var _createClass3 = _interopRequireDefault(_createClass2);
-
- var _dragulaWithAnimation = __webpack_require__(96);
-
- var _dragulaWithAnimation2 = _interopRequireDefault(_dragulaWithAnimation);
-
- var _classes = __webpack_require__(108);
-
- var _classes2 = _interopRequireDefault(_classes);
-
- var _util = __webpack_require__(109);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var isTest = false;
- var bodyPaddingRight = void 0;
- var bodyOverflow = void 0;
-
- var Dragger = function () {
- function Dragger(_ref) {
- var _this = this;
-
- var originTable = _ref.originTable,
- mode = _ref.mode;
- (0, _classCallCheck3.default)(this, Dragger);
- var dragger = originTable.dragger,
- cellIndex = originTable.cellIndex,
- originEl = originTable.el,
- options = originTable.options;
-
- var fakeTables = this.fakeTables = buildTables(originEl, mode);
-
- bodyPaddingRight = parseInt(document.body.style.paddingRight, 0) || 0;
- bodyOverflow = document.body.style.overflow;
-
- this.options = options;
- this.mode = mode;
- this.originTable = originTable;
- this.dragger = dragger;
- this.index = mode === 'column' ? cellIndex.x : cellIndex.y;
- ['destroy', 'onDrag', 'onDragend', 'onShadow', 'onOut'].forEach(function (m) {
- _this[m] = _this[m].bind(_this);
- });
-
- this.el = fakeTables.reduce(function (previous, current) {
- var li = document.createElement('li');
- li.appendChild(current);
- return previous.appendChild(li) && previous;
- }, document.createElement('ul'));
-
- this.drake = (0, _dragulaWithAnimation2.default)([this.el], {
- animation: 300,
- staticClass: _classes2.default.static,
- direction: mode === 'column' ? 'horizontal' : 'vertical'
- }).on('drag', this.onDrag).on('dragend', this.onDragend).on('shadow', this.onShadow).on('out', this.onOut);
-
- this.renderEl();
- this.dispatchMousedown();
- }
-
- (0, _createClass3.default)(Dragger, [{
- key: 'onDrag',
- value: function onDrag() {
- (0, _util.css)(document.body, { overflow: 'hidden' });
- var barWidth = (0, _util.getScrollBarWidth)();
- this.dragger.dragging = true;
- if (barWidth) {
- (0, _util.css)(document.body, { 'padding-right': barWidth + bodyPaddingRight + 'px' });
- }
- (0, _util.touchy)(document, 'remove', 'mouseup', this.destroy);
- this.dragger.emit('drag', this.originTable.el, this.options.mode);
- }
- }, {
- key: 'onDragend',
- value: function onDragend(droppedItem) {
- var originEl = this.originTable.el,
- dragger = this.dragger,
- index = this.index,
- mode = this.mode,
- el = this.el;
-
- (0, _util.css)(document.body, { overflow: bodyOverflow, 'padding-right': bodyPaddingRight + 'px' });
- this.dragger.dragging = false;
- var from = index;
- var to = (0, _from2.default)(el.children).indexOf(droppedItem);
- this.destroy();
- dragger.emit('drop', from, to, originEl, mode);
- }
- }, {
- key: 'onShadow',
- value: function onShadow(draggingItem) {
- var originEl = this.originTable.el,
- dragger = this.dragger,
- index = this.index,
- el = this.el,
- mode = this.mode;
-
- var from = index;
- var to = (0, _from2.default)(el.children).indexOf(draggingItem);
- dragger.emit('shadowMove', from, to, originEl, mode);
- }
- }, {
- key: 'onOut',
- value: function onOut() {
- this.dragger.dragging = false;
- this.dragger.emit('out', this.originTable.el, this.mode);
- }
- }, {
- key: 'destroy',
- value: function destroy() {
- var _this2 = this;
-
- (0, _util.remove)(document, 'mouseup', this.destroy);
- this.el.parentElement.classList.remove(_classes2.default.dragging);
- if (!isTest) {
- this.el.parentElement.removeChild(this.el);
- }
- setTimeout(function () {
- _this2.drake.destroy();
- }, 0);
- }
- }, {
- key: 'dispatchMousedown',
- value: function dispatchMousedown() {
- var el = this.el,
- index = this.index;
-
- el.children[index].dispatchEvent((0, _util.getTouchyEvent)());
- }
- }, {
- key: 'renderEl',
- value: function renderEl() {
- var _this3 = this;
-
- var mode = this.mode,
- el = this.el,
- originEl = this.originTable.el;
-
-
- this.sizeFakes();
- (0, _util.css)(el, {
- position: 'absolute',
- top: originEl.offsetTop + 'px',
- left: originEl.offsetLeft + 'px'
- });
- (0, _util.insertBeforeSibling)({ target: el, origin: originEl });
-
- var s = window.getComputedStyle(originEl).getPropertyValue('border-spacing').split(' ')[0];
- var attr = mode === 'column' ? 'margin-right' : 'margin-bottom';
- var l = el.children.length;
- (0, _from2.default)(el.children).forEach(function (li, dex) {
- var table = li && li.querySelector('table');
- if (_this3.options.onlyBody && mode === 'row' && !(0, _from2.default)(table.children).some(function (o) {
- return o.nodeName === 'TBODY';
- })) {
- li.classList.add(_classes2.default.static);
- }
-
- if (s && dex < l - 1) {
- li.style[attr] = '-' + s;
- }
- });
-
- el.parentElement.classList.add(_classes2.default.dragging);
- el.classList.add(_classes2.default.draggableTable);
- el.classList.add('sindu_' + mode);
- }
- }, {
- key: 'sizeFakes',
- value: function sizeFakes() {
- return this.mode === 'column' ? this.sizeColumnFake() : this.sizeRowFake();
- }
- }, {
- key: 'sizeColumnFake',
- value: function sizeColumnFake() {
- var fakeTables = this.fakeTables,
- originEl = this.originTable.el;
-
- (0, _from2.default)((0, _util.getLongestRow)(originEl).children).forEach(function (cell, index) {
- var w = cell.getBoundingClientRect().width;
- var t = fakeTables[index];
- (0, _util.css)(t, { width: w + 'px' });
- (0, _util.css)(t.rows[0].children[0], { width: w + 'px' });
- });
-
- var rowHeights = (0, _from2.default)(originEl.rows).map(function (row) {
- return row.children[0].getBoundingClientRect().height;
- });
- fakeTables.forEach(function (t) {
- (0, _from2.default)(t.rows).forEach(function (row, index) {
- (0, _util.css)(row, { height: rowHeights[index] + 'px' });
- });
- });
- }
- }, {
- key: 'sizeRowFake',
- value: function sizeRowFake() {
- var fakeTables = this.fakeTables,
- originEl = this.originTable.el;
-
-
- var cells = (0, _util.getLongestRow)(originEl).children;
- var w = originEl.getBoundingClientRect().width;
-
- fakeTables.forEach(function (t) {
- (0, _util.css)(t, { width: w + 'px' });
- (0, _from2.default)(t.rows[0].children).forEach(function (cell, i) {
- (0, _util.css)(cell, { width: cells[i].getBoundingClientRect().width + 'px' });
- });
- });
- }
- }]);
- return Dragger;
- }();
-
- exports.default = Dragger;
-
- function origin2DragItem(liTable) {
- (0, _util.css)(liTable, { 'table-layout': 'fixed', width: 'initial', height: 'initial', padding: 0, margin: 0 });
- ['width', 'height', 'id'].forEach(function (p) {
- liTable.removeAttribute(p);
- });
- liTable.classList.remove(_classes2.default.originTable);
- (0, _from2.default)(liTable.querySelectorAll('col')).forEach(function (col) {
- col.removeAttribute('width');
- (0, _util.css)(col, { width: 'initial' });
- });
- }
-
- function getColumnAsTableByIndex(table, index) {
- var cTable = table.cloneNode(true);
- origin2DragItem(cTable);
-
- var cols = cTable.querySelectorAll('col');
- if (cols.length) {
- (0, _from2.default)(cols).forEach(function (col, dex) {
- if (dex !== index) {
- col.parentElement.removeChild(col);
- }
- });
- }
-
- (0, _from2.default)(cTable.rows).forEach(function (row) {
- var target = row.children[index];
- (0, _util.empty)(row);
- if (target) {
- row.appendChild(target);
- }
- });
- return cTable;
- }
-
- function buildRowTables(table) {
- return (0, _from2.default)(table.rows).map(function (row) {
- var cTable = table.cloneNode(true);
-
- origin2DragItem(cTable);
-
- (0, _from2.default)(cTable.children).forEach(function (c) {
- var nodeName = c.nodeName;
-
- if (nodeName !== 'COL' && nodeName !== 'COLGROUP') {
- cTable.removeChild(c);
- }
- });
-
- var organ = row.parentElement.cloneNode();
- organ.innerHTML = '';
- organ.appendChild(row.cloneNode(true));
- cTable.appendChild(organ);
- return cTable;
- });
- }
-
- function buildColumnTables(table) {
- return (0, _from2.default)((0, _util.getLongestRow)(table).children).map(function (cell, index) {
- return getColumnAsTableByIndex(table, index);
- });
- }
-
- function buildTables(table, mode) {
- return mode === 'column' ? buildColumnTables(table) : buildRowTables(table);
- }
- /***/ },
- /* 96 */
- /***/ function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var emitter = __webpack_require__(97);
- var crossvent = __webpack_require__(104);
- var classes = __webpack_require__(107);
- var doc = document;
- var documentElement = doc.documentElement;
- var oldCoord = 0;
-
- function dragula (initialContainers, options) {
- var len = arguments.length;
- if (len === 1 && Array.isArray(initialContainers) === false) {
- options = initialContainers;
- initialContainers = [];
- }
- var _mirror; // mirror image
- var _source; // source container
- var _item; // item being dragged
- var _offsetX; // reference x
- var _offsetY; // reference y
- var _moveX; // reference move x
- var _moveY; // reference move y
- var _initialSibling; // reference sibling when grabbed
- var _currentSibling; // reference sibling now
- var _copy; // item used for copying
- var _renderTimer; // timer for setTimeout renderMirrorImage
- var _lastDropTarget = null; // last container item was over
- var _grabbed; // holds mousedown context until first mousemove
-
- var o = options || {};
- if (o.moves === void 0) {
- o.moves = always;
- }
- if (o.accepts === void 0) {
- o.accepts = always;
- }
- if (o.invalid === void 0) {
- o.invalid = invalidTarget;
- }
- if (o.containers === void 0) {
- o.containers = initialContainers || [];
- }
- if (o.isContainer === void 0) {
- o.isContainer = never;
- }
- if (o.copy === void 0) {
- o.copy = false;
- }
- if (o.copySortSource === void 0) {
- o.copySortSource = false;
- }
- if (o.revertOnSpill === void 0) {
- o.revertOnSpill = false;
- }
- if (o.removeOnSpill === void 0) {
- o.removeOnSpill = false;
- }
- if (o.direction === void 0) {
- o.direction = 'vertical';
- }
- if (o.ignoreInputTextSelection === void 0) {
- o.ignoreInputTextSelection = true;
- }
- if (o.mirrorContainer === void 0) {
- o.mirrorContainer = doc.body;
- }
- if (o.animation === void 0) {
- o.animation = false;
- }
- // 设置静态不动项目
- if (o.staticClass === void 0) {
- o.staticClass = '';
- }
-
- var drake = emitter({
- containers: o.containers,
- start: manualStart,
- end: end,
- cancel: cancel,
- remove: remove,
- destroy: destroy,
- canMove: canMove,
- dragging: false
- });
-
- if (o.removeOnSpill === true) {
- drake.on('over', spillOver).on('out', spillOut);
- }
-
- events();
-
- return drake;
-
- function isContainer (el) {
- return drake.containers.indexOf(el) !== -1 || o.isContainer(el);
- }
-
- function events (remove) {
- var op = remove ? 'remove' : 'add';
- touchy(documentElement, op, 'mousedown', grab);
- touchy(documentElement, op, 'mouseup', release);
- }
-
- function eventualMovements (remove) {
- var op = remove ? 'remove' : 'add';
- touchy(documentElement, op, 'mousemove', startBecauseMouseMoved);
- }
-
- function movements (remove) {
- var op = remove ? 'remove' : 'add';
- crossvent[op](documentElement, 'selectstart', preventGrabbed); // IE8
- crossvent[op](documentElement, 'click', preventGrabbed);
- }
-
- function destroy () {
- events(true);
- release({});
- }
-
- function preventGrabbed (e) {
- if (_grabbed) {
- e.preventDefault();
- }
- }
-
- function grab (e) {
- _moveX = e.clientX;
- _moveY = e.clientY;
-
- var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey;
- if (ignore) {
- return; // we only care about honest-to-god left clicks and touch events
- }
- var item = e.target;
- var context = canStart(item);
- if (!context) {
- return;
- }
- _grabbed = context;
- eventualMovements();
- if (e.type === 'mousedown') {
- if (isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208
- item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176
- } else {
- e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155
- }
- }
- }
-
- function startBecauseMouseMoved (e) {
- if (!_grabbed) {
- return;
- }
- if (whichMouseButton(e) === 0) {
- release({});
- return; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope
- }
- // truthy check fixes #239, equality fixes #207
- if (e.clientX !== void 0 && e.clientX === _moveX && e.clientY !== void 0 && e.clientY === _moveY) {
- return;
- }
- if (o.ignoreInputTextSelection) {
- var clientX = getCoord('clientX', e);
- var clientY = getCoord('clientY', e);
- var elementBehindCursor = doc.elementFromPoint(clientX, clientY);
- if (isInput(elementBehindCursor)) {
- return;
- }
- }
-
- var grabbed = _grabbed; // call to end() unsets _grabbed
- eventualMovements(true);
- movements();
- end();
- start(grabbed);
-
- var offset = getOffset(_item);
- _offsetX = getCoord('pageX', e) - offset.left;
- _offsetY = getCoord('pageY', e) - offset.top;
-
- classes.add(_copy || _item, 'gu-transit');
- renderMirrorImage();
- drag(e);
- }
-
- function canStart (item) {
- if (drake.dragging && _mirror) {
- return;
- }
- if (isContainer(item)) {
- return; // don't drag container itself
- }
- var handle = item;
- while (getParent(item) && isContainer(getParent(item)) === false) {
- if (o.invalid(item, handle)) {
- return;
- }
- item = getParent(item); // drag target should be a top element
- if (!item) {
- return;
- }
- }
- var source = getParent(item);
- if (!source) {
- return;
- }
- if (o.invalid(item, handle) || (o.staticClass && item.classList.contains(o.staticClass))) {
- return;
- }
-
- var movable = o.moves(item, source, handle, nextEl(item));
- if (!movable) {
- return;
- }
-
- return {
- item: item,
- source: source
- };
- }
-
- function canMove (item) {
- return !!canStart(item);
- }
-
- function manualStart (item) {
- var context = canStart(item);
- if (context) {
- start(context);
- }
- }
-
- function start (context) {
- if (isCopy(context.item, context.source)) {
- _copy = context.item.cloneNode(true);
- drake.emit('cloned', _copy, context.item, 'copy');
- }
-
- _source = context.source;
- _item = context.item;
- _initialSibling = _currentSibling = nextEl(context.item);
-
- drake.dragging = true;
- drake.emit('drag', _item, _source);
- }
-
- function invalidTarget () {
- return false;
- }
-
- function end () {
- if (!drake.dragging) {
- return;
- }
- var item = _copy || _item;
- drop(item, getParent(item));
- }
-
- function ungrab () {
- _grabbed = false;
- eventualMovements(true);
- movements(true);
- }
-
- function release (e) {
- ungrab();
-
- if (!drake.dragging) {
- return;
- }
- var item = _copy || _item;
- var clientX = getCoord('clientX', e);
- var clientY = getCoord('clientY', e);
- var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);
- var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);
- if (dropTarget && ((_copy && o.copySortSource) || (!_copy || dropTarget !== _source))) {
- drop(item, dropTarget);
- } else if (o.removeOnSpill) {
- remove();
- } else {
- cancel();
- }
- }
-
- function drop (item, target) {
- var parent = getParent(item);
- if (_copy && o.copySortSource && target === _source) {
- parent.removeChild(_item);
- }
- if (isInitialPlacement(target)) {
- drake.emit('cancel', item, _source, _source);
- } else {
- drake.emit('drop', item, target, _source, _currentSibling);
- }
- cleanup();
- }
-
- function remove () {
- if (!drake.dragging) {
- return;
- }
- var item = _copy || _item;
- var parent = getParent(item);
- if (parent) {
- parent.removeChild(item);
- }
- drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source);
- cleanup();
- }
-
- function cancel (revert) {
- if (!drake.dragging) {
- return;
- }
- var reverts = arguments.length > 0 ? revert : o.revertOnSpill;
- var item = _copy || _item;
- var parent = getParent(item);
- var initial = isInitialPlacement(parent);
- if (initial === false && reverts) {
- if (_copy) {
- if (parent) {
- parent.removeChild(_copy);
- }
- } else {
- _source.insertBefore(item, _initialSibling);
- }
- }
- if (initial || reverts) {
- drake.emit('cancel', item, _source, _source);
- } else {
- drake.emit('drop', item, parent, _source, _currentSibling);
- }
- cleanup();
- }
-
- function cleanup () {
- var item = _copy || _item;
- ungrab();
- removeMirrorImage();
- if (item) {
- classes.rm(item, 'gu-transit');
- }
- if (_renderTimer) {
- clearTimeout(_renderTimer);
- }
- drake.dragging = false;
- if (_lastDropTarget) {
- drake.emit('out', item, _lastDropTarget, _source);
- }
- drake.emit('dragend', item);
- _source = _item = _copy = _initialSibling = _currentSibling = _renderTimer = _lastDropTarget = null;
- }
-
- function isInitialPlacement (target, s) {
- var sibling;
- if (s !== void 0) {
- sibling = s;
- } else if (_mirror) {
- sibling = _currentSibling;
- } else {
- sibling = nextEl(_copy || _item);
- }
- return target === _source && sibling === _initialSibling;
- }
-
- function findDropTarget (elementBehindCursor, clientX, clientY) {
- var target = elementBehindCursor;
- while (target && !accepted()) {
- target = getParent(target);
- }
- return target;
-
- function accepted () {
- var droppable = isContainer(target);
- if (droppable === false) {
- return false;
- }
-
- var immediate = getImmediateChild(target, elementBehindCursor);
- var reference = getReference(target, immediate, clientX, clientY);
- var initial = isInitialPlacement(target, reference);
- if (initial) {
- return true; // should always be able to drop it right back where it was
- }
- return o.accepts(_item, target, _source, reference);
- }
- }
-
-
- function drag (e) {
- if (!_mirror) {
- return;
- }
- e.preventDefault();
-
- var clientX = getCoord('clientX', e);
- var clientY = getCoord('clientY', e);
- var x = clientX - _offsetX;
- var y = clientY - _offsetY;
-
- _mirror.style.left = x + 'px';
- _mirror.style.top = y + 'px';
-
- var item = _copy || _item;
- var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);
- var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);
- var changed = dropTarget !== null && dropTarget !== _lastDropTarget;
- if (changed || dropTarget === null) {
- out();
- _lastDropTarget = dropTarget;
- over();
- }
- var parent = getParent(item);
- if (dropTarget === _source && _copy && !o.copySortSource) {
- if (parent) {
- parent.removeChild(item);
- }
- return;
- }
- var reference;
- // var mover, moverRect;
- // var previous, next, previousRect, nextRect, itemRect;
- // var currentPrevious, currentNext;
- var immediate = getImmediateChild(dropTarget, elementBehindCursor);
- if (immediate !== null) {
- reference = getReference(dropTarget, immediate, clientX, clientY);
- } else if (o.revertOnSpill === true && !_copy) {
- reference = _initialSibling;
- dropTarget = _source;
- } else {
- if (_copy && parent) {
- parent.removeChild(item);
- }
- return;
- }
- if (
- (reference === null && changed) ||
- reference !== item &&
- reference !== nextEl(item)
- ) {
- _currentSibling = reference;
-
- var isBrother = item.parentElement === dropTarget;
- var shouldAnimate = isBrother && o.animation;
- var itemRect = item.getBoundingClientRect();
- var direct = o.direction;
- var mover;
- var nowCord = direct === 'horizontal' ? e.pageX : e.pageY;
- if (nowCord < oldCoord) {
- mover = reference; //upward or right
- } else {
- mover = reference ? (reference.previousElementSibling ? reference.previousElementSibling : reference) : dropTarget.lastElementChild;
- }
- oldCoord = nowCord;
- if (!mover) {
- return;
- }
- if (o.staticClass && mover.classList.contains(o.staticClass)) {
- return;
- }
- var moverRect = mover && mover.getBoundingClientRect();
- dropTarget.insertBefore(item, reference);
- if (shouldAnimate && mover && moverRect) {
- animate(moverRect, mover, o.animation);
- animate(itemRect, item, o.animation);
- }
- drake.emit('shadow', item, dropTarget, _source);
- }
- function moved (type) {
- drake.emit(type, item, _lastDropTarget, _source);
- }
-
- function over () {
- if (changed) {
- moved('over');
- }
- }
-
- function out () {
- if (_lastDropTarget) {
- moved('out');
- }
- }
- }
-
- function spillOver (el) {
- classes.rm(el, 'gu-hide');
- }
-
- function spillOut (el) {
- if (drake.dragging) {
- classes.add(el, 'gu-hide');
- }
- }
-
- function renderMirrorImage () {
- if (_mirror) {
- return;
- }
- var rect = _item.getBoundingClientRect();
- _mirror = _item.cloneNode(true);
- _mirror.style.width = getRectWidth(rect) + 'px';
- _mirror.style.height = getRectHeight(rect) + 'px';
- classes.rm(_mirror, 'gu-transit');
- classes.add(_mirror, 'gu-mirror');
- o.mirrorContainer.appendChild(_mirror);
- touchy(documentElement, 'add', 'mousemove', drag);
- classes.add(o.mirrorContainer, 'gu-unselectable');
- drake.emit('cloned', _mirror, _item, 'mirror');
- }
-
- function removeMirrorImage () {
- if (_mirror) {
- classes.rm(o.mirrorContainer, 'gu-unselectable');
- touchy(documentElement, 'remove', 'mousemove', drag);
- getParent(_mirror).removeChild(_mirror);
- _mirror = null;
- }
- }
-
- function getImmediateChild (dropTarget, target) {
- var immediate = target;
- while (immediate !== dropTarget && getParent(immediate) !== dropTarget) {
- immediate = getParent(immediate);
- }
- if (immediate === documentElement) {
- return null;
- }
- return immediate;
- }
-
- function getReference (dropTarget, target, x, y) {
- var horizontal = o.direction === 'horizontal';
- var reference = target !== dropTarget ? inside() : outside();
- return reference;
-
- function outside () { // slower, but able to figure out any position
- var len = dropTarget.children.length;
- var i;
- var el;
- var rect;
- for (i = 0; i < len; i++) {
- el = dropTarget.children[i];
- rect = el.getBoundingClientRect();
- if (horizontal && (rect.left + rect.width / 2) > x) {
- return el;
- }
- if (!horizontal && (rect.top + rect.height / 2) > y) {
- return el;
- }
- }
- return null;
- }
-
- function inside () { // faster, but only available if dropped inside a child element
- var rect = target.getBoundingClientRect();
- if (horizontal) {
- return resolve(x > rect.left + getRectWidth(rect) / 2);
- }
- return resolve(y > rect.top + getRectHeight(rect) / 2);
- }
-
- function resolve (after) {
- return after ? nextEl(target) : target;
- }
- }
-
- function isCopy (item, container) {
- return typeof o.copy === 'boolean' ? o.copy : o.copy(item, container);
- }
- }
-
- function touchy (el, op, type, fn) {
- var touch = {
- mouseup: 'touchend',
- mousedown: 'touchstart',
- mousemove: 'touchmove'
- };
- var pointers = {
- mouseup: 'pointerup',
- mousedown: 'pointerdown',
- mousemove: 'pointermove'
- };
- var microsoft = {
- mouseup: 'MSPointerUp',
- mousedown: 'MSPointerDown',
- mousemove: 'MSPointerMove'
- };
- if (global.navigator.pointerEnabled) {
- crossvent[op](el, pointers[type], fn);
- } else if (global.navigator.msPointerEnabled) {
- crossvent[op](el, microsoft[type], fn);
- } else {
- crossvent[op](el, touch[type], fn);
- crossvent[op](el, type, fn);
- }
- }
-
- function whichMouseButton (e) {
- if (e.touches !== void 0) {
- return e.touches.length;
- }
- if (e.which !== void 0 && e.which !== 0) {
- return e.which;
- } // see https://github.com/bevacqua/dragula/issues/261
- if (e.buttons !== void 0) {
- return e.buttons;
- }
- var button = e.button;
- if (button !== void 0) { // see https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575
- return button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);
- }
- }
-
- function getOffset (el) {
- var rect = el.getBoundingClientRect();
- return {
- left: rect.left + getScroll('scrollLeft', 'pageXOffset'),
- top: rect.top + getScroll('scrollTop', 'pageYOffset')
- };
- }
-
- function getScroll (scrollProp, offsetProp) {
- if (typeof global[offsetProp] !== 'undefined') {
- return global[offsetProp];
- }
- if (documentElement.clientHeight) {
- return documentElement[scrollProp];
- }
- return doc.body[scrollProp];
- }
-
- function getElementBehindPoint (point, x, y) {
- var p = point || {};
- var state = p.className;
- var el;
- p.className += ' gu-hide';
- el = doc.elementFromPoint(x, y);
- p.className = state;
- return el;
- }
-
- function never () {
- return false;
- }
- function always () {
- return true;
- }
- function getRectWidth (rect) {
- return rect.width || (rect.right - rect.left);
- }
- function getRectHeight (rect) {
- return rect.height || (rect.bottom - rect.top);
- }
- function getParent (el) {
- return el.parentNode === doc ? null : el.parentNode;
- }
- function isInput (el) {
- return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el);
- }
- function isEditable (el) {
- if (!el) {
- return false;
- } // no parents were editable
- if (el.contentEditable === 'false') {
- return false;
- } // stop the lookup
- if (el.contentEditable === 'true') {
- return true;
- } // found a contentEditable element in the chain
- return isEditable(getParent(el)); // contentEditable is set to 'inherit'
- }
-
- function nextEl (el) {
- return el.nextElementSibling || manually();
- function manually () {
- var sibling = el;
- do {
- sibling = sibling.nextSibling;
- } while (sibling && sibling.nodeType !== 1);
- return sibling;
- }
- }
-
- // function previousEl (el) {
- // return el.previousElementSibling || manually();
- // function manually () {
- // var sibling = el;
- // do {
- // sibling = sibling.previousSibling;
- // } while (sibling && sibling.nodeType !== 1);
- // return sibling;
- // }
- // }
-
- function animate (prevRect, target, time) {
- if (time) {
- if (!prevRect || !target) {
- return;
- }
- var currentRect = target.getBoundingClientRect();
- target.style.transition = 'none';
- target.style.transform = 'translate3d(' + (prevRect.left - currentRect.left) + 'px,' + (prevRect.top - currentRect.top) + 'px,0)';
- target.offsetWidth; // repaint
- target.style.transition = 'all ' + time + 'ms';
- target.style.transform = 'translate3d(0,0,0)';
- clearTimeout(target.animated);
- target.animated = setTimeout(function () {
- target.style.transition = '';
- target.style.transform = '';
- target.animated = false;
- }, time);
- }
- }
-
-
- function getEventHost (e) {
- // on touchend event, we have to use `e.changedTouches`
- // see http://stackoverflow.com/questions/7192563/touchend-event-properties
- // see https://github.com/bevacqua/dragula/issues/34
- if (e.targetTouches && e.targetTouches.length) {
- return e.targetTouches[0];
- }
- if (e.changedTouches && e.changedTouches.length) {
- return e.changedTouches[0];
- }
- return e;
- }
-
- function getCoord (coord, e) {
- var host = getEventHost(e);
- var missMap = {
- pageX: 'clientX', // IE8
- pageY: 'clientY' // IE8
- };
- if (coord in missMap && !(coord in host) && missMap[coord] in host) {
- coord = missMap[coord];
- }
- return host[coord];
- }
-
- module.exports = dragula;
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ },
- /* 97 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- var atoa = __webpack_require__(98);
- var debounce = __webpack_require__(99);
-
- module.exports = function emitter (thing, options) {
- var opts = options || {};
- var evt = {};
- if (thing === undefined) { thing = {}; }
- thing.on = function (type, fn) {
- if (!evt[type]) {
- evt[type] = [fn];
- } else {
- evt[type].push(fn);
- }
- return thing;
- };
- thing.once = function (type, fn) {
- fn._once = true; // thing.off(fn) still works!
- thing.on(type, fn);
- return thing;
- };
- thing.off = function (type, fn) {
- var c = arguments.length;
- if (c === 1) {
- delete evt[type];
- } else if (c === 0) {
- evt = {};
- } else {
- var et = evt[type];
- if (!et) { return thing; }
- et.splice(et.indexOf(fn), 1);
- }
- return thing;
- };
- thing.emit = function () {
- var args = atoa(arguments);
- return thing.emitterSnapshot(args.shift()).apply(this, args);
- };
- thing.emitterSnapshot = function (type) {
- var et = (evt[type] || []).slice(0);
- return function () {
- var args = atoa(arguments);
- var ctx = this || thing;
- if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
- et.forEach(function emitter (listen) {
- if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
- if (listen._once) { thing.off(type, listen); }
- });
- return thing;
- };
- };
- return thing;
- };
- /***/ },
- /* 98 */
- /***/ function(module, exports) {
- module.exports = function atoa (a, n) { return Array.prototype.slice.call(a, n); }
- /***/ },
- /* 99 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- var ticky = __webpack_require__(100);
-
- module.exports = function debounce (fn, args, ctx) {
- if (!fn) { return; }
- ticky(function run () {
- fn.apply(ctx || null, args || []);
- });
- };
- /***/ },
- /* 100 */
- /***/ function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(setImmediate) {var si = typeof setImmediate === 'function', tick;
- if (si) {
- tick = function (fn) { setImmediate(fn); };
- } else {
- tick = function (fn) { setTimeout(fn, 0); };
- }
-
- module.exports = tick;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(101).setImmediate))
- /***/ },
- /* 101 */
- /***/ function(module, exports, __webpack_require__) {
- var apply = Function.prototype.apply;
-
- // DOM APIs, for completeness
-
- exports.setTimeout = function() {
- return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
- };
- exports.setInterval = function() {
- return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
- };
- exports.clearTimeout =
- exports.clearInterval = function(timeout) {
- if (timeout) {
- timeout.close();
- }
- };
-
- function Timeout(id, clearFn) {
- this._id = id;
- this._clearFn = clearFn;
- }
- Timeout.prototype.unref = Timeout.prototype.ref = function() {};
- Timeout.prototype.close = function() {
- this._clearFn.call(window, this._id);
- };
-
- // Does not start the time, just sets up the members needed.
- exports.enroll = function(item, msecs) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = msecs;
- };
-
- exports.unenroll = function(item) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = -1;
- };
-
- exports._unrefActive = exports.active = function(item) {
- clearTimeout(item._idleTimeoutId);
-
- var msecs = item._idleTimeout;
- if (msecs >= 0) {
- item._idleTimeoutId = setTimeout(function onTimeout() {
- if (item._onTimeout)
- item._onTimeout();
- }, msecs);
- }
- };
-
- // setimmediate attaches itself to the global object
- __webpack_require__(102);
- exports.setImmediate = setImmediate;
- exports.clearImmediate = clearImmediate;
- /***/ },
- /* 102 */
- /***/ function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
- "use strict";
-
- if (global.setImmediate) {
- return;
- }
-
- var nextHandle = 1; // Spec says greater than zero
- var tasksByHandle = {};
- var currentlyRunningATask = false;
- var doc = global.document;
- var registerImmediate;
-
- function setImmediate(callback) {
- // Callback can either be a function or a string
- if (typeof callback !== "function") {
- callback = new Function("" + callback);
- }
- // Copy function arguments
- var args = new Array(arguments.length - 1);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i + 1];
- }
- // Store and register the task
- var task = { callback: callback, args: args };
- tasksByHandle[nextHandle] = task;
- registerImmediate(nextHandle);
- return nextHandle++;
- }
-
- function clearImmediate(handle) {
- delete tasksByHandle[handle];
- }
-
- function run(task) {
- var callback = task.callback;
- var args = task.args;
- switch (args.length) {
- case 0:
- callback();
- break;
- case 1:
- callback(args[0]);
- break;
- case 2:
- callback(args[0], args[1]);
- break;
- case 3:
- callback(args[0], args[1], args[2]);
- break;
- default:
- callback.apply(undefined, args);
- break;
- }
- }
-
- function runIfPresent(handle) {
- // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
- // So if we're currently running a task, we'll need to delay this invocation.
- if (currentlyRunningATask) {
- // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
- // "too much recursion" error.
- setTimeout(runIfPresent, 0, handle);
- } else {
- var task = tasksByHandle[handle];
- if (task) {
- currentlyRunningATask = true;
- try {
- run(task);
- } finally {
- clearImmediate(handle);
- currentlyRunningATask = false;
- }
- }
- }
- }
-
- function installNextTickImplementation() {
- registerImmediate = function(handle) {
- process.nextTick(function () { runIfPresent(handle); });
- };
- }
-
- function canUsePostMessage() {
- // The test against `importScripts` prevents this implementation from being installed inside a web worker,
- // where `global.postMessage` means something completely different and can't be used for this purpose.
- if (global.postMessage && !global.importScripts) {
- var postMessageIsAsynchronous = true;
- var oldOnMessage = global.onmessage;
- global.onmessage = function() {
- postMessageIsAsynchronous = false;
- };
- global.postMessage("", "*");
- global.onmessage = oldOnMessage;
- return postMessageIsAsynchronous;
- }
- }
-
- function installPostMessageImplementation() {
- // Installs an event handler on `global` for the `message` event: see
- // * https://developer.mozilla.org/en/DOM/window.postMessage
- // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
-
- var messagePrefix = "setImmediate$" + Math.random() + "$";
- var onGlobalMessage = function(event) {
- if (event.source === global &&
- typeof event.data === "string" &&
- event.data.indexOf(messagePrefix) === 0) {
- runIfPresent(+event.data.slice(messagePrefix.length));
- }
- };
-
- if (global.addEventListener) {
- global.addEventListener("message", onGlobalMessage, false);
- } else {
- global.attachEvent("onmessage", onGlobalMessage);
- }
-
- registerImmediate = function(handle) {
- global.postMessage(messagePrefix + handle, "*");
- };
- }
-
- function installMessageChannelImplementation() {
- var channel = new MessageChannel();
- channel.port1.onmessage = function(event) {
- var handle = event.data;
- runIfPresent(handle);
- };
-
- registerImmediate = function(handle) {
- channel.port2.postMessage(handle);
- };
- }
-
- function installReadyStateChangeImplementation() {
- var html = doc.documentElement;
- registerImmediate = function(handle) {
- // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
- // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
- var script = doc.createElement("script");
- script.onreadystatechange = function () {
- runIfPresent(handle);
- script.onreadystatechange = null;
- html.removeChild(script);
- script = null;
- };
- html.appendChild(script);
- };
- }
-
- function installSetTimeoutImplementation() {
- registerImmediate = function(handle) {
- setTimeout(runIfPresent, 0, handle);
- };
- }
-
- // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
- var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
- attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
-
- // Don't get fooled by e.g. browserify environments.
- if ({}.toString.call(global.process) === "[object process]") {
- // For Node.js before 0.9
- installNextTickImplementation();
-
- } else if (canUsePostMessage()) {
- // For non-IE10 modern browsers
- installPostMessageImplementation();
-
- } else if (global.MessageChannel) {
- // For web workers, where supported
- installMessageChannelImplementation();
-
- } else if (doc && "onreadystatechange" in doc.createElement("script")) {
- // For IE 6–8
- installReadyStateChangeImplementation();
-
- } else {
- // For older browsers
- installSetTimeoutImplementation();
- }
-
- attachTo.setImmediate = setImmediate;
- attachTo.clearImmediate = clearImmediate;
- }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(103)))
- /***/ },
- /* 103 */
- /***/ function(module, exports) {
- // shim for using process in browser
- var process = module.exports = {};
-
- // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
-
- var cachedSetTimeout;
- var cachedClearTimeout;
-
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
- function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
- }
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- } ())
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-
-
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-
-
-
- }
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
-
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
- }
-
- function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
-
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- };
-
- // v8 likes predictible objects
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
- process.versions = {};
-
- function noop() {}
-
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
-
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
-
- process.cwd = function () { return '/' };
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
- process.umask = function() { return 0; };
- /***/ },
- /* 104 */
- /***/ function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var customEvent = __webpack_require__(105);
- var eventmap = __webpack_require__(106);
- var doc = global.document;
- var addEvent = addEventEasy;
- var removeEvent = removeEventEasy;
- var hardCache = [];
-
- if (!global.addEventListener) {
- addEvent = addEventHard;
- removeEvent = removeEventHard;
- }
-
- module.exports = {
- add: addEvent,
- remove: removeEvent,
- fabricate: fabricateEvent
- };
-
- function addEventEasy (el, type, fn, capturing) {
- return el.addEventListener(type, fn, capturing);
- }
-
- function addEventHard (el, type, fn) {
- return el.attachEvent('on' + type, wrap(el, type, fn));
- }
-
- function removeEventEasy (el, type, fn, capturing) {
- return el.removeEventListener(type, fn, capturing);
- }
-
- function removeEventHard (el, type, fn) {
- var listener = unwrap(el, type, fn);
- if (listener) {
- return el.detachEvent('on' + type, listener);
- }
- }
-
- function fabricateEvent (el, type, model) {
- var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();
- if (el.dispatchEvent) {
- el.dispatchEvent(e);
- } else {
- el.fireEvent('on' + type, e);
- }
- function makeClassicEvent () {
- var e;
- if (doc.createEvent) {
- e = doc.createEvent('Event');
- e.initEvent(type, true, true);
- } else if (doc.createEventObject) {
- e = doc.createEventObject();
- }
- return e;
- }
- function makeCustomEvent () {
- return new customEvent(type, { detail: model });
- }
- }
-
- function wrapperFactory (el, type, fn) {
- return function wrapper (originalEvent) {
- var e = originalEvent || global.event;
- e.target = e.target || e.srcElement;
- e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
- e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
- e.which = e.which || e.keyCode;
- fn.call(el, e);
- };
- }
-
- function wrap (el, type, fn) {
- var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);
- hardCache.push({
- wrapper: wrapper,
- element: el,
- type: type,
- fn: fn
- });
- return wrapper;
- }
-
- function unwrap (el, type, fn) {
- var i = find(el, type, fn);
- if (i) {
- var wrapper = hardCache[i].wrapper;
- hardCache.splice(i, 1); // free up a tad of memory
- return wrapper;
- }
- }
-
- function find (el, type, fn) {
- var i, item;
- for (i = 0; i < hardCache.length; i++) {
- item = hardCache[i];
- if (item.element === el && item.type === type && item.fn === fn) {
- return i;
- }
- }
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ },
- /* 105 */
- /***/ function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {
- var NativeCustomEvent = global.CustomEvent;
-
- function useNative () {
- try {
- var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
- return 'cat' === p.type && 'bar' === p.detail.foo;
- } catch (e) {
- }
- return false;
- }
-
- /**
- * Cross-browser `CustomEvent` constructor.
- *
- * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
- *
- * @public
- */
-
- module.exports = useNative() ? NativeCustomEvent :
-
- // IE >= 9
- 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
- var e = document.createEvent('CustomEvent');
- if (params) {
- e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
- } else {
- e.initCustomEvent(type, false, false, void 0);
- }
- return e;
- } :
-
- // IE <= 8
- function CustomEvent (type, params) {
- var e = document.createEventObject();
- e.type = type;
- if (params) {
- e.bubbles = Boolean(params.bubbles);
- e.cancelable = Boolean(params.cancelable);
- e.detail = params.detail;
- } else {
- e.bubbles = false;
- e.cancelable = false;
- e.detail = void 0;
- }
- return e;
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ },
- /* 106 */
- /***/ function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var eventmap = [];
- var eventname = '';
- var ron = /^on/;
-
- for (eventname in global) {
- if (ron.test(eventname)) {
- eventmap.push(eventname.slice(2));
- }
- }
-
- module.exports = eventmap;
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ },
- /* 107 */
- /***/ function(module, exports) {
- 'use strict';
-
- var cache = {};
- var start = '(?:^|\\s)';
- var end = '(?:\\s|$)';
-
- function lookupClass (className) {
- var cached = cache[className];
- if (cached) {
- cached.lastIndex = 0;
- } else {
- cache[className] = cached = new RegExp(start + className + end, 'g');
- }
- return cached;
- }
-
- function addClass (el, className) {
- var current = el.className;
- if (!current.length) {
- el.className = className;
- } else if (!lookupClass(className).test(current)) {
- el.className += ' ' + className;
- }
- }
-
- function rmClass (el, className) {
- el.className = el.className.replace(lookupClass(className), ' ').trim();
- }
-
- module.exports = {
- add: addClass,
- rm: rmClass
- };
- /***/ },
- /* 108 */
- /***/ function(module, exports) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = {
- originTable: 'sindu_origin_table',
- draggableTable: 'sindu_dragger',
- dragging: 'sindu_dragging',
- static: 'sindu_static',
- handle: 'sindu_handle'
- };
- /***/ },
- /* 109 */
- /***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getScrollBarWidth = exports.sort = exports.insertBeforeSibling = exports.appendSibling = exports.remove = exports.on = exports.empty = exports.css = exports.getLongestRow = exports.touchy = exports.getTouchyEvent = undefined;
-
- var _keys = __webpack_require__(110);
-
- var _keys2 = _interopRequireDefault(_keys);
-
- var _from = __webpack_require__(79);
-
- var _from2 = _interopRequireDefault(_from);
-
- var _crossvent = __webpack_require__(114);
-
- var _crossvent2 = _interopRequireDefault(_crossvent);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var global = window;
- var touch = {
- mouseup: 'touchend',
- mousedown: 'touchstart',
- mousemove: 'touchmove'
- };
- var pointers = {
- mouseup: 'pointerup',
- mousedown: 'pointerdown',
- mousemove: 'pointermove'
- };
-
- var getTouchyEvent = exports.getTouchyEvent = function getTouchyEvent() {
- var event = void 0;
- if (global.navigator.pointerEnabled) {
- if (document.createEvent) {
- event = document.createEvent("PointerEvent");
- event.initMouseEvent("pointerdown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- } else {
- event = new PointerEvent('pointerdown', {
- cancelable: true,
- bubbles: true,
- view: window
- });
- }
- }
- if (document.createEvent) {
- event = document.createEvent("MouseEvent");
- event.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- } else {
- event = new MouseEvent('mousedown', {
- 'view': window,
- 'bubbles': true,
- 'cancelable': true
- });
- }
- return event;
- };
-
- var touchy = exports.touchy = function touchy(el, op, type, fn) {
- if (global.navigator.pointerEnabled) {
- _crossvent2.default[op](el, pointers[type], fn);
- } else {
- _crossvent2.default[op](el, touch[type], fn);
- _crossvent2.default[op](el, type, fn);
- }
- };
-
- var getLongestRow = exports.getLongestRow = function getLongestRow(table) {
- var result = table.rows[0];
- (0, _from2.default)(table.rows).forEach(function (row) {
- var rowL = row.children.length;
- var resultL = result.children.length;
- result = rowL > resultL ? row : result;
- });
- return result;
- };
-
- var css = exports.css = function css(el, csses) {
- (0, _keys2.default)(csses).forEach(function (k) {
- el.style[k] = csses[k];
- });
- return el;
- };
-
- var empty = exports.empty = function empty(node) {
- while (node.firstElementChild) {
- node.removeChild(node.firstElementChild);
- }
- };
- var on = exports.on = function on(el, eventName, cb) {
- el.addEventListener(eventName, cb);
- };
-
- var remove = exports.remove = function remove(el, eventName, cb) {
- el.removeEventListener(eventName, cb);
- };
-
- var appendSibling = exports.appendSibling = function appendSibling(_ref) {
- var target = _ref.target,
- origin = _ref.origin,
- parent = _ref.parent;
-
- if (!target) {
- return;
- }
-
- (parent || target.parentElement).insertBefore(target, origin ? origin.nextElementSibling : null);
- };
-
- var insertBeforeSibling = exports.insertBeforeSibling = function insertBeforeSibling(_ref2) {
- var target = _ref2.target,
- origin = _ref2.origin;
-
- if (!target) {
- return;
- }
- origin.parentElement.insertBefore(target, origin);
- };
-
- var sort = exports.sort = function sort(_ref3) {
- var list = _ref3.list,
- from = _ref3.from,
- to = _ref3.to,
- parent = _ref3.parent;
-
- if (from < to) {
- appendSibling({ target: list[from], origin: list[to], parent: parent });
- } else {
- insertBeforeSibling({ target: list[from], origin: list[to] });
- }
- };
-
- var getScrollBarWidth = exports.getScrollBarWidth = function getScrollBarWidth() {
- if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
- return 0;
- }
- var inner = document.createElement('p');
- inner.style.width = '100%';
- inner.style.height = '200px';
-
- var outer = document.createElement('div');
- outer.style.position = 'absolute';
- outer.style.top = '0px';
- outer.style.left = '0px';
- outer.style.visibility = 'hidden';
- outer.style.width = '200px';
- outer.style.height = '150px';
- outer.style.overflow = 'hidden';
- outer.appendChild(inner);
-
- document.body.appendChild(outer);
- var w1 = inner.offsetWidth;
- outer.style.overflow = 'scroll';
- var w2 = inner.offsetWidth;
- if (w1 === w2) w2 = outer.clientWidth;
-
- document.body.removeChild(outer);
-
- return w1 - w2;
- };
- /***/ },
- /* 110 */
- /***/ function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(111), __esModule: true };
- /***/ },
- /* 111 */
- /***/ function(module, exports, __webpack_require__) {
- __webpack_require__(112);
- module.exports = __webpack_require__(17).Object.keys;
- /***/ },
- /* 112 */
- /***/ function(module, exports, __webpack_require__) {
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(52)
- , $keys = __webpack_require__(36);
-
- __webpack_require__(113)('keys', function(){
- return function keys(it){
- return $keys(toObject(it));
- };
- });
- /***/ },
- /* 113 */
- /***/ function(module, exports, __webpack_require__) {
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(15)
- , core = __webpack_require__(17)
- , fails = __webpack_require__(26);
- module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
- };
- /***/ },
- /* 114 */
- /***/ function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var customEvent = __webpack_require__(115);
- var eventmap = __webpack_require__(116);
- var doc = global.document;
- var addEvent = addEventEasy;
- var removeEvent = removeEventEasy;
- var hardCache = [];
-
- if (!global.addEventListener) {
- addEvent = addEventHard;
- removeEvent = removeEventHard;
- }
-
- module.exports = {
- add: addEvent,
- remove: removeEvent,
- fabricate: fabricateEvent
- };
-
- function addEventEasy (el, type, fn, capturing) {
- return el.addEventListener(type, fn, capturing);
- }
-
- function addEventHard (el, type, fn) {
- return el.attachEvent('on' + type, wrap(el, type, fn));
- }
-
- function removeEventEasy (el, type, fn, capturing) {
- return el.removeEventListener(type, fn, capturing);
- }
-
- function removeEventHard (el, type, fn) {
- var listener = unwrap(el, type, fn);
- if (listener) {
- return el.detachEvent('on' + type, listener);
- }
- }
-
- function fabricateEvent (el, type, model) {
- var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();
- if (el.dispatchEvent) {
- el.dispatchEvent(e);
- } else {
- el.fireEvent('on' + type, e);
- }
- function makeClassicEvent () {
- var e;
- if (doc.createEvent) {
- e = doc.createEvent('Event');
- e.initEvent(type, true, true);
- } else if (doc.createEventObject) {
- e = doc.createEventObject();
- }
- return e;
- }
- function makeCustomEvent () {
- return new customEvent(type, { detail: model });
- }
- }
-
- function wrapperFactory (el, type, fn) {
- return function wrapper (originalEvent) {
- var e = originalEvent || global.event;
- e.target = e.target || e.srcElement;
- e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
- e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
- e.which = e.which || e.keyCode;
- fn.call(el, e);
- };
- }
-
- function wrap (el, type, fn) {
- var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);
- hardCache.push({
- wrapper: wrapper,
- element: el,
- type: type,
- fn: fn
- });
- return wrapper;
- }
-
- function unwrap (el, type, fn) {
- var i = find(el, type, fn);
- if (i) {
- var wrapper = hardCache[i].wrapper;
- hardCache.splice(i, 1); // free up a tad of memory
- return wrapper;
- }
- }
-
- function find (el, type, fn) {
- var i, item;
- for (i = 0; i < hardCache.length; i++) {
- item = hardCache[i];
- if (item.element === el && item.type === type && item.fn === fn) {
- return i;
- }
- }
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ },
- /* 115 */
- /***/ function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {
- var NativeCustomEvent = global.CustomEvent;
-
- function useNative () {
- try {
- var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
- return 'cat' === p.type && 'bar' === p.detail.foo;
- } catch (e) {
- }
- return false;
- }
-
- /**
- * Cross-browser `CustomEvent` constructor.
- *
- * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
- *
- * @public
- */
-
- module.exports = useNative() ? NativeCustomEvent :
-
- // IE >= 9
- 'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
- var e = document.createEvent('CustomEvent');
- if (params) {
- e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
- } else {
- e.initCustomEvent(type, false, false, void 0);
- }
- return e;
- } :
-
- // IE <= 8
- function CustomEvent (type, params) {
- var e = document.createEventObject();
- e.type = type;
- if (params) {
- e.bubbles = Boolean(params.bubbles);
- e.cancelable = Boolean(params.cancelable);
- e.detail = params.detail;
- } else {
- e.bubbles = false;
- e.cancelable = false;
- e.detail = void 0;
- }
- return e;
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ },
- /* 116 */
- /***/ function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var eventmap = [];
- var eventname = '';
- var ron = /^on/;
-
- for (eventname in global) {
- if (ron.test(eventname)) {
- eventmap.push(eventname.slice(2));
- }
- }
-
- module.exports = eventmap;
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }
- /******/ ])
- });
- ;
- //# sourceMappingURL=table-dragger.js.map
|