table-dragger.js 132 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["tableDragger"] = factory();
  8. else
  9. root["tableDragger"] = factory();
  10. })(this, function() {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/
  15. /******/ // The require function
  16. /******/ function __webpack_require__(moduleId) {
  17. /******/
  18. /******/ // Check if module is in cache
  19. /******/ if(installedModules[moduleId])
  20. /******/ return installedModules[moduleId].exports;
  21. /******/
  22. /******/ // Create a new module (and put it into the cache)
  23. /******/ var module = installedModules[moduleId] = {
  24. /******/ exports: {},
  25. /******/ id: moduleId,
  26. /******/ loaded: false
  27. /******/ };
  28. /******/
  29. /******/ // Execute the module function
  30. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/ // Flag the module as loaded
  33. /******/ module.loaded = true;
  34. /******/
  35. /******/ // Return the exports of the module
  36. /******/ return module.exports;
  37. /******/ }
  38. /******/
  39. /******/
  40. /******/ // expose the modules object (__webpack_modules__)
  41. /******/ __webpack_require__.m = modules;
  42. /******/
  43. /******/ // expose the module cache
  44. /******/ __webpack_require__.c = installedModules;
  45. /******/
  46. /******/ // __webpack_public_path__
  47. /******/ __webpack_require__.p = "";
  48. /******/
  49. /******/ // Load entry module and return exports
  50. /******/ return __webpack_require__(0);
  51. /******/ })
  52. /************************************************************************/
  53. /******/ ([
  54. /* 0 */
  55. /***/ function(module, exports, __webpack_require__) {
  56. 'use strict';
  57. Object.defineProperty(exports, "__esModule", {
  58. value: true
  59. });
  60. __webpack_require__(1);
  61. var _drag = __webpack_require__(5);
  62. var _drag2 = _interopRequireDefault(_drag);
  63. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  64. var create = function create(el, options) {
  65. return _drag2.default.create(el, options);
  66. };
  67. exports.default = create;
  68. module.exports = create;
  69. /***/ },
  70. /* 1 */
  71. /***/ function(module, exports, __webpack_require__) {
  72. // style-loader: Adds some css to the DOM by adding a <style> tag
  73. // load the styles
  74. var content = __webpack_require__(2);
  75. if(typeof content === 'string') content = [[module.id, content, '']];
  76. // add the styles to the DOM
  77. var update = __webpack_require__(4)(content, {});
  78. if(content.locals) module.exports = content.locals;
  79. // Hot Module Replacement
  80. if(false) {
  81. // When the styles change, update the <style> tags
  82. if(!content.locals) {
  83. module.hot.accept("!!./../node_modules/css-loader/index.js!./main.css", function() {
  84. var newContent = require("!!./../node_modules/css-loader/index.js!./main.css");
  85. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  86. update(newContent);
  87. });
  88. }
  89. // When the module is disposed, remove the <style> tags
  90. module.hot.dispose(function() { update(); });
  91. }
  92. /***/ },
  93. /* 2 */
  94. /***/ function(module, exports, __webpack_require__) {
  95. exports = module.exports = __webpack_require__(3)();
  96. // imports
  97. // module
  98. 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", ""]);
  99. // exports
  100. /***/ },
  101. /* 3 */
  102. /***/ function(module, exports) {
  103. /*
  104. MIT License http://www.opensource.org/licenses/mit-license.php
  105. Author Tobias Koppers @sokra
  106. */
  107. // css base code, injected by the css-loader
  108. module.exports = function() {
  109. var list = [];
  110. // return the list of modules as css string
  111. list.toString = function toString() {
  112. var result = [];
  113. for(var i = 0; i < this.length; i++) {
  114. var item = this[i];
  115. if(item[2]) {
  116. result.push("@media " + item[2] + "{" + item[1] + "}");
  117. } else {
  118. result.push(item[1]);
  119. }
  120. }
  121. return result.join("");
  122. };
  123. // import a list of modules into the list
  124. list.i = function(modules, mediaQuery) {
  125. if(typeof modules === "string")
  126. modules = [[null, modules, ""]];
  127. var alreadyImportedModules = {};
  128. for(var i = 0; i < this.length; i++) {
  129. var id = this[i][0];
  130. if(typeof id === "number")
  131. alreadyImportedModules[id] = true;
  132. }
  133. for(i = 0; i < modules.length; i++) {
  134. var item = modules[i];
  135. // skip already imported module
  136. // this implementation is not 100% perfect for weird media query combinations
  137. // when a module is imported multiple times with different media queries.
  138. // I hope this will never occur (Hey this way we have smaller bundles)
  139. if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
  140. if(mediaQuery && !item[2]) {
  141. item[2] = mediaQuery;
  142. } else if(mediaQuery) {
  143. item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
  144. }
  145. list.push(item);
  146. }
  147. }
  148. };
  149. return list;
  150. };
  151. /***/ },
  152. /* 4 */
  153. /***/ function(module, exports, __webpack_require__) {
  154. /*
  155. MIT License http://www.opensource.org/licenses/mit-license.php
  156. Author Tobias Koppers @sokra
  157. */
  158. var stylesInDom = {},
  159. memoize = function(fn) {
  160. var memo;
  161. return function () {
  162. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  163. return memo;
  164. };
  165. },
  166. isOldIE = memoize(function() {
  167. return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
  168. }),
  169. getHeadElement = memoize(function () {
  170. return document.head || document.getElementsByTagName("head")[0];
  171. }),
  172. singletonElement = null,
  173. singletonCounter = 0,
  174. styleElementsInsertedAtTop = [];
  175. module.exports = function(list, options) {
  176. if(false) {
  177. if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  178. }
  179. options = options || {};
  180. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  181. // tags it will allow on a page
  182. if (typeof options.singleton === "undefined") options.singleton = isOldIE();
  183. // By default, add <style> tags to the bottom of <head>.
  184. if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
  185. var styles = listToStyles(list);
  186. addStylesToDom(styles, options);
  187. return function update(newList) {
  188. var mayRemove = [];
  189. for(var i = 0; i < styles.length; i++) {
  190. var item = styles[i];
  191. var domStyle = stylesInDom[item.id];
  192. domStyle.refs--;
  193. mayRemove.push(domStyle);
  194. }
  195. if(newList) {
  196. var newStyles = listToStyles(newList);
  197. addStylesToDom(newStyles, options);
  198. }
  199. for(var i = 0; i < mayRemove.length; i++) {
  200. var domStyle = mayRemove[i];
  201. if(domStyle.refs === 0) {
  202. for(var j = 0; j < domStyle.parts.length; j++)
  203. domStyle.parts[j]();
  204. delete stylesInDom[domStyle.id];
  205. }
  206. }
  207. };
  208. }
  209. function addStylesToDom(styles, options) {
  210. for(var i = 0; i < styles.length; i++) {
  211. var item = styles[i];
  212. var domStyle = stylesInDom[item.id];
  213. if(domStyle) {
  214. domStyle.refs++;
  215. for(var j = 0; j < domStyle.parts.length; j++) {
  216. domStyle.parts[j](item.parts[j]);
  217. }
  218. for(; j < item.parts.length; j++) {
  219. domStyle.parts.push(addStyle(item.parts[j], options));
  220. }
  221. } else {
  222. var parts = [];
  223. for(var j = 0; j < item.parts.length; j++) {
  224. parts.push(addStyle(item.parts[j], options));
  225. }
  226. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  227. }
  228. }
  229. }
  230. function listToStyles(list) {
  231. var styles = [];
  232. var newStyles = {};
  233. for(var i = 0; i < list.length; i++) {
  234. var item = list[i];
  235. var id = item[0];
  236. var css = item[1];
  237. var media = item[2];
  238. var sourceMap = item[3];
  239. var part = {css: css, media: media, sourceMap: sourceMap};
  240. if(!newStyles[id])
  241. styles.push(newStyles[id] = {id: id, parts: [part]});
  242. else
  243. newStyles[id].parts.push(part);
  244. }
  245. return styles;
  246. }
  247. function insertStyleElement(options, styleElement) {
  248. var head = getHeadElement();
  249. var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
  250. if (options.insertAt === "top") {
  251. if(!lastStyleElementInsertedAtTop) {
  252. head.insertBefore(styleElement, head.firstChild);
  253. } else if(lastStyleElementInsertedAtTop.nextSibling) {
  254. head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
  255. } else {
  256. head.appendChild(styleElement);
  257. }
  258. styleElementsInsertedAtTop.push(styleElement);
  259. } else if (options.insertAt === "bottom") {
  260. head.appendChild(styleElement);
  261. } else {
  262. throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
  263. }
  264. }
  265. function removeStyleElement(styleElement) {
  266. styleElement.parentNode.removeChild(styleElement);
  267. var idx = styleElementsInsertedAtTop.indexOf(styleElement);
  268. if(idx >= 0) {
  269. styleElementsInsertedAtTop.splice(idx, 1);
  270. }
  271. }
  272. function createStyleElement(options) {
  273. var styleElement = document.createElement("style");
  274. styleElement.type = "text/css";
  275. insertStyleElement(options, styleElement);
  276. return styleElement;
  277. }
  278. function createLinkElement(options) {
  279. var linkElement = document.createElement("link");
  280. linkElement.rel = "stylesheet";
  281. insertStyleElement(options, linkElement);
  282. return linkElement;
  283. }
  284. function addStyle(obj, options) {
  285. var styleElement, update, remove;
  286. if (options.singleton) {
  287. var styleIndex = singletonCounter++;
  288. styleElement = singletonElement || (singletonElement = createStyleElement(options));
  289. update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
  290. remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
  291. } else if(obj.sourceMap &&
  292. typeof URL === "function" &&
  293. typeof URL.createObjectURL === "function" &&
  294. typeof URL.revokeObjectURL === "function" &&
  295. typeof Blob === "function" &&
  296. typeof btoa === "function") {
  297. styleElement = createLinkElement(options);
  298. update = updateLink.bind(null, styleElement);
  299. remove = function() {
  300. removeStyleElement(styleElement);
  301. if(styleElement.href)
  302. URL.revokeObjectURL(styleElement.href);
  303. };
  304. } else {
  305. styleElement = createStyleElement(options);
  306. update = applyToTag.bind(null, styleElement);
  307. remove = function() {
  308. removeStyleElement(styleElement);
  309. };
  310. }
  311. update(obj);
  312. return function updateStyle(newObj) {
  313. if(newObj) {
  314. if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
  315. return;
  316. update(obj = newObj);
  317. } else {
  318. remove();
  319. }
  320. };
  321. }
  322. var replaceText = (function () {
  323. var textStore = [];
  324. return function (index, replacement) {
  325. textStore[index] = replacement;
  326. return textStore.filter(Boolean).join('\n');
  327. };
  328. })();
  329. function applyToSingletonTag(styleElement, index, remove, obj) {
  330. var css = remove ? "" : obj.css;
  331. if (styleElement.styleSheet) {
  332. styleElement.styleSheet.cssText = replaceText(index, css);
  333. } else {
  334. var cssNode = document.createTextNode(css);
  335. var childNodes = styleElement.childNodes;
  336. if (childNodes[index]) styleElement.removeChild(childNodes[index]);
  337. if (childNodes.length) {
  338. styleElement.insertBefore(cssNode, childNodes[index]);
  339. } else {
  340. styleElement.appendChild(cssNode);
  341. }
  342. }
  343. }
  344. function applyToTag(styleElement, obj) {
  345. var css = obj.css;
  346. var media = obj.media;
  347. if(media) {
  348. styleElement.setAttribute("media", media)
  349. }
  350. if(styleElement.styleSheet) {
  351. styleElement.styleSheet.cssText = css;
  352. } else {
  353. while(styleElement.firstChild) {
  354. styleElement.removeChild(styleElement.firstChild);
  355. }
  356. styleElement.appendChild(document.createTextNode(css));
  357. }
  358. }
  359. function updateLink(linkElement, obj) {
  360. var css = obj.css;
  361. var sourceMap = obj.sourceMap;
  362. if(sourceMap) {
  363. // http://stackoverflow.com/a/26603875
  364. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  365. }
  366. var blob = new Blob([css], { type: "text/css" });
  367. var oldSrc = linkElement.href;
  368. linkElement.href = URL.createObjectURL(blob);
  369. if(oldSrc)
  370. URL.revokeObjectURL(oldSrc);
  371. }
  372. /***/ },
  373. /* 5 */
  374. /***/ function(module, exports, __webpack_require__) {
  375. 'use strict';
  376. Object.defineProperty(exports, "__esModule", {
  377. value: true
  378. });
  379. var _typeof2 = __webpack_require__(6);
  380. var _typeof3 = _interopRequireDefault(_typeof2);
  381. var _getIterator2 = __webpack_require__(74);
  382. var _getIterator3 = _interopRequireDefault(_getIterator2);
  383. var _from = __webpack_require__(79);
  384. var _from2 = _interopRequireDefault(_from);
  385. var _assign = __webpack_require__(86);
  386. var _assign2 = _interopRequireDefault(_assign);
  387. var _classCallCheck2 = __webpack_require__(90);
  388. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  389. var _createClass2 = __webpack_require__(91);
  390. var _createClass3 = _interopRequireDefault(_createClass2);
  391. var _draggableList = __webpack_require__(95);
  392. var _draggableList2 = _interopRequireDefault(_draggableList);
  393. var _classes = __webpack_require__(108);
  394. var _classes2 = _interopRequireDefault(_classes);
  395. var _util = __webpack_require__(109);
  396. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  397. var Drag = function () {
  398. function Drag() {
  399. var _this = this;
  400. var table = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  401. var userOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  402. (0, _classCallCheck3.default)(this, Drag);
  403. if (!checkIsTable(table)) {
  404. throw new TypeError('table-dragger: el must be TABLE HTMLElement, not ' + {}.toString.call(table));
  405. }
  406. if (!table.rows.length) {
  407. return;
  408. }
  409. var defaults = {
  410. mode: 'column',
  411. dragHandler: '',
  412. onlyBody: false,
  413. animation: 300
  414. };
  415. var options = this.options = (0, _assign2.default)({}, defaults, userOptions);
  416. var mode = options.mode;
  417. if (mode === 'free' && !options.dragHandler) {
  418. throw new Error('table-dragger: please specify dragHandler in free mode');
  419. }
  420. ['onTap', 'destroy', 'startBecauseMouseMoved', 'sortColumn', 'sortRow'].forEach(function (m) {
  421. _this[m] = _this[m].bind(_this);
  422. });
  423. var dragger = this.dragger = emitter({
  424. dragging: false,
  425. destroy: this.destroy
  426. });
  427. dragger.on('drop', function (from, to, originEl, realMode) {
  428. (realMode === 'column' ? _this.sortColumn : _this.sortRow)(from, to);
  429. });
  430. var handlers = void 0;
  431. if (options.dragHandler) {
  432. handlers = table.querySelectorAll(options.dragHandler);
  433. if (handlers && !handlers.length) {
  434. throw new Error('table-dragger: no element match dragHandler selector');
  435. }
  436. } else {
  437. handlers = mode === 'column' ? table.rows[0] ? table.rows[0].children : [] : (0, _from2.default)(table.rows).map(function (row) {
  438. return row.children[0];
  439. });
  440. }
  441. this.handlers = (0, _from2.default)(handlers);
  442. this.handlers.forEach(function (h) {
  443. h.classList.add(_classes2.default.handle);
  444. });
  445. table.classList.add(_classes2.default.originTable);
  446. this.tappedCoord = { x: 0, y: 0 };
  447. this.cellIndex = { x: 0, y: 0 };
  448. this.el = table;
  449. this.bindEvents();
  450. }
  451. (0, _createClass3.default)(Drag, [{
  452. key: 'bindEvents',
  453. value: function bindEvents() {
  454. var _iteratorNormalCompletion = true;
  455. var _didIteratorError = false;
  456. var _iteratorError = undefined;
  457. try {
  458. for (var _iterator = (0, _getIterator3.default)(this.handlers), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  459. var e = _step.value;
  460. (0, _util.touchy)(e, 'add', 'mousedown', this.onTap);
  461. }
  462. } catch (err) {
  463. _didIteratorError = true;
  464. _iteratorError = err;
  465. } finally {
  466. try {
  467. if (!_iteratorNormalCompletion && _iterator.return) {
  468. _iterator.return();
  469. }
  470. } finally {
  471. if (_didIteratorError) {
  472. throw _iteratorError;
  473. }
  474. }
  475. }
  476. }
  477. }, {
  478. key: 'onTap',
  479. value: function onTap(event) {
  480. var _this2 = this;
  481. var target = event.target;
  482. while (target.nodeName !== 'TD' && target.nodeName !== 'TH') {
  483. target = target.parentElement;
  484. }
  485. var ignore = !isLeftButton(event) || event.metaKey || event.ctrlKey;
  486. if (ignore) {
  487. return;
  488. }
  489. this.cellIndex = { x: target.cellIndex, y: target.parentElement.rowIndex };
  490. this.tappedCoord = { x: event.clientX, y: event.clientY };
  491. this.eventualStart(false);
  492. (0, _util.touchy)(document, 'add', 'mouseup', function () {
  493. _this2.eventualStart(true);
  494. });
  495. }
  496. }, {
  497. key: 'startBecauseMouseMoved',
  498. value: function startBecauseMouseMoved(event) {
  499. var tappedCoord = this.tappedCoord,
  500. mode = this.options.mode;
  501. var gapX = Math.abs(event.clientX - tappedCoord.x);
  502. var gapY = Math.abs(event.clientY - tappedCoord.y);
  503. var isFree = mode === 'free';
  504. var realMode = mode;
  505. if (gapX === 0 && gapY === 0) {
  506. return;
  507. }
  508. if (isFree) {
  509. realMode = gapX < gapY ? 'row' : 'column';
  510. }
  511. var sortTable = new _draggableList2.default({
  512. mode: realMode,
  513. originTable: this
  514. });
  515. this.eventualStart(true);
  516. (0, _util.touchy)(document, 'add', 'mouseup', sortTable.destroy);
  517. }
  518. }, {
  519. key: 'eventualStart',
  520. value: function eventualStart(remove) {
  521. var op = remove ? 'remove' : 'add';
  522. (0, _util.touchy)(document, op, 'mousemove', this.startBecauseMouseMoved);
  523. }
  524. }, {
  525. key: 'destroy',
  526. value: function destroy() {
  527. var _iteratorNormalCompletion2 = true;
  528. var _didIteratorError2 = false;
  529. var _iteratorError2 = undefined;
  530. try {
  531. for (var _iterator2 = (0, _getIterator3.default)(this.handlers), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
  532. var h = _step2.value;
  533. (0, _util.touchy)(h, 'remove', 'mousedown', this.onTap);
  534. }
  535. } catch (err) {
  536. _didIteratorError2 = true;
  537. _iteratorError2 = err;
  538. } finally {
  539. try {
  540. if (!_iteratorNormalCompletion2 && _iterator2.return) {
  541. _iterator2.return();
  542. }
  543. } finally {
  544. if (_didIteratorError2) {
  545. throw _iteratorError2;
  546. }
  547. }
  548. }
  549. this.el.classList.remove(_classes2.default.originTable);
  550. }
  551. }, {
  552. key: 'sortColumn',
  553. value: function sortColumn(from, to) {
  554. if (from === to) {
  555. return;
  556. }
  557. var table = this.el;
  558. (0, _from2.default)(table.rows).forEach(function (row) {
  559. (0, _util.sort)({ list: row.children, from: from, to: to });
  560. });
  561. var cols = table.querySelectorAll('col');
  562. if (cols.length) {
  563. (0, _util.sort)({ list: cols, from: from, to: to });
  564. }
  565. }
  566. }, {
  567. key: 'sortRow',
  568. value: function sortRow(from, to) {
  569. if (from === to) {
  570. return;
  571. }
  572. var table = this.el;
  573. var list = (0, _from2.default)(table.rows);
  574. (0, _util.sort)({ list: list, parent: list[to].parentElement, from: from, to: to });
  575. }
  576. }], [{
  577. key: 'create',
  578. value: function create(el, options) {
  579. var d = new Drag(el, options);
  580. return d && d.dragger;
  581. }
  582. }]);
  583. return Drag;
  584. }();
  585. Drag.version = '1.0';
  586. exports.default = Drag;
  587. function checkIsTable(ele) {
  588. return ele && (typeof ele === 'undefined' ? 'undefined' : (0, _typeof3.default)(ele)) === 'object' && 'nodeType' in ele && ele.nodeType === 1 && ele.cloneNode && ele.nodeName === 'TABLE';
  589. }
  590. function isLeftButton(e) {
  591. if ('touches' in e) {
  592. return e.touches.length === 1;
  593. }
  594. if ('buttons' in e) {
  595. return e.buttons === 1;
  596. }
  597. if ('button' in e) {
  598. return e.button === 0;
  599. }
  600. return false;
  601. }
  602. function emitter() {
  603. var thing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  604. var evt = {};
  605. thing.on = function (type, fn) {
  606. evt[type] = evt[type] || [];
  607. evt[type].push(fn);
  608. return thing;
  609. };
  610. thing.emit = function (type) {
  611. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  612. args[_key - 1] = arguments[_key];
  613. }
  614. if (!evt[type]) {
  615. return;
  616. }
  617. var _iteratorNormalCompletion3 = true;
  618. var _didIteratorError3 = false;
  619. var _iteratorError3 = undefined;
  620. try {
  621. for (var _iterator3 = (0, _getIterator3.default)(evt[type]), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
  622. var fn = _step3.value;
  623. fn.apply(undefined, args);
  624. }
  625. } catch (err) {
  626. _didIteratorError3 = true;
  627. _iteratorError3 = err;
  628. } finally {
  629. try {
  630. if (!_iteratorNormalCompletion3 && _iterator3.return) {
  631. _iterator3.return();
  632. }
  633. } finally {
  634. if (_didIteratorError3) {
  635. throw _iteratorError3;
  636. }
  637. }
  638. }
  639. };
  640. return thing;
  641. }
  642. /***/ },
  643. /* 6 */
  644. /***/ function(module, exports, __webpack_require__) {
  645. "use strict";
  646. exports.__esModule = true;
  647. var _iterator = __webpack_require__(7);
  648. var _iterator2 = _interopRequireDefault(_iterator);
  649. var _symbol = __webpack_require__(58);
  650. var _symbol2 = _interopRequireDefault(_symbol);
  651. 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; };
  652. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  653. exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
  654. return typeof obj === "undefined" ? "undefined" : _typeof(obj);
  655. } : function (obj) {
  656. return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
  657. };
  658. /***/ },
  659. /* 7 */
  660. /***/ function(module, exports, __webpack_require__) {
  661. module.exports = { "default": __webpack_require__(8), __esModule: true };
  662. /***/ },
  663. /* 8 */
  664. /***/ function(module, exports, __webpack_require__) {
  665. __webpack_require__(9);
  666. __webpack_require__(53);
  667. module.exports = __webpack_require__(57).f('iterator');
  668. /***/ },
  669. /* 9 */
  670. /***/ function(module, exports, __webpack_require__) {
  671. 'use strict';
  672. var $at = __webpack_require__(10)(true);
  673. // 21.1.3.27 String.prototype[@@iterator]()
  674. __webpack_require__(13)(String, 'String', function(iterated){
  675. this._t = String(iterated); // target
  676. this._i = 0; // next index
  677. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  678. }, function(){
  679. var O = this._t
  680. , index = this._i
  681. , point;
  682. if(index >= O.length)return {value: undefined, done: true};
  683. point = $at(O, index);
  684. this._i += point.length;
  685. return {value: point, done: false};
  686. });
  687. /***/ },
  688. /* 10 */
  689. /***/ function(module, exports, __webpack_require__) {
  690. var toInteger = __webpack_require__(11)
  691. , defined = __webpack_require__(12);
  692. // true -> String#at
  693. // false -> String#codePointAt
  694. module.exports = function(TO_STRING){
  695. return function(that, pos){
  696. var s = String(defined(that))
  697. , i = toInteger(pos)
  698. , l = s.length
  699. , a, b;
  700. if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
  701. a = s.charCodeAt(i);
  702. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  703. ? TO_STRING ? s.charAt(i) : a
  704. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  705. };
  706. };
  707. /***/ },
  708. /* 11 */
  709. /***/ function(module, exports) {
  710. // 7.1.4 ToInteger
  711. var ceil = Math.ceil
  712. , floor = Math.floor;
  713. module.exports = function(it){
  714. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  715. };
  716. /***/ },
  717. /* 12 */
  718. /***/ function(module, exports) {
  719. // 7.2.1 RequireObjectCoercible(argument)
  720. module.exports = function(it){
  721. if(it == undefined)throw TypeError("Can't call method on " + it);
  722. return it;
  723. };
  724. /***/ },
  725. /* 13 */
  726. /***/ function(module, exports, __webpack_require__) {
  727. 'use strict';
  728. var LIBRARY = __webpack_require__(14)
  729. , $export = __webpack_require__(15)
  730. , redefine = __webpack_require__(30)
  731. , hide = __webpack_require__(20)
  732. , has = __webpack_require__(31)
  733. , Iterators = __webpack_require__(32)
  734. , $iterCreate = __webpack_require__(33)
  735. , setToStringTag = __webpack_require__(49)
  736. , getPrototypeOf = __webpack_require__(51)
  737. , ITERATOR = __webpack_require__(50)('iterator')
  738. , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
  739. , FF_ITERATOR = '@@iterator'
  740. , KEYS = 'keys'
  741. , VALUES = 'values';
  742. var returnThis = function(){ return this; };
  743. module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
  744. $iterCreate(Constructor, NAME, next);
  745. var getMethod = function(kind){
  746. if(!BUGGY && kind in proto)return proto[kind];
  747. switch(kind){
  748. case KEYS: return function keys(){ return new Constructor(this, kind); };
  749. case VALUES: return function values(){ return new Constructor(this, kind); };
  750. } return function entries(){ return new Constructor(this, kind); };
  751. };
  752. var TAG = NAME + ' Iterator'
  753. , DEF_VALUES = DEFAULT == VALUES
  754. , VALUES_BUG = false
  755. , proto = Base.prototype
  756. , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
  757. , $default = $native || getMethod(DEFAULT)
  758. , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
  759. , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
  760. , methods, key, IteratorPrototype;
  761. // Fix native
  762. if($anyNative){
  763. IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
  764. if(IteratorPrototype !== Object.prototype){
  765. // Set @@toStringTag to native iterators
  766. setToStringTag(IteratorPrototype, TAG, true);
  767. // fix for some old engines
  768. if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
  769. }
  770. }
  771. // fix Array#{values, @@iterator}.name in V8 / FF
  772. if(DEF_VALUES && $native && $native.name !== VALUES){
  773. VALUES_BUG = true;
  774. $default = function values(){ return $native.call(this); };
  775. }
  776. // Define iterator
  777. if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
  778. hide(proto, ITERATOR, $default);
  779. }
  780. // Plug for library
  781. Iterators[NAME] = $default;
  782. Iterators[TAG] = returnThis;
  783. if(DEFAULT){
  784. methods = {
  785. values: DEF_VALUES ? $default : getMethod(VALUES),
  786. keys: IS_SET ? $default : getMethod(KEYS),
  787. entries: $entries
  788. };
  789. if(FORCED)for(key in methods){
  790. if(!(key in proto))redefine(proto, key, methods[key]);
  791. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  792. }
  793. return methods;
  794. };
  795. /***/ },
  796. /* 14 */
  797. /***/ function(module, exports) {
  798. module.exports = true;
  799. /***/ },
  800. /* 15 */
  801. /***/ function(module, exports, __webpack_require__) {
  802. var global = __webpack_require__(16)
  803. , core = __webpack_require__(17)
  804. , ctx = __webpack_require__(18)
  805. , hide = __webpack_require__(20)
  806. , PROTOTYPE = 'prototype';
  807. var $export = function(type, name, source){
  808. var IS_FORCED = type & $export.F
  809. , IS_GLOBAL = type & $export.G
  810. , IS_STATIC = type & $export.S
  811. , IS_PROTO = type & $export.P
  812. , IS_BIND = type & $export.B
  813. , IS_WRAP = type & $export.W
  814. , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
  815. , expProto = exports[PROTOTYPE]
  816. , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
  817. , key, own, out;
  818. if(IS_GLOBAL)source = name;
  819. for(key in source){
  820. // contains in native
  821. own = !IS_FORCED && target && target[key] !== undefined;
  822. if(own && key in exports)continue;
  823. // export native or passed
  824. out = own ? target[key] : source[key];
  825. // prevent global pollution for namespaces
  826. exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
  827. // bind timers to global for call from export context
  828. : IS_BIND && own ? ctx(out, global)
  829. // wrap global constructors for prevent change them in library
  830. : IS_WRAP && target[key] == out ? (function(C){
  831. var F = function(a, b, c){
  832. if(this instanceof C){
  833. switch(arguments.length){
  834. case 0: return new C;
  835. case 1: return new C(a);
  836. case 2: return new C(a, b);
  837. } return new C(a, b, c);
  838. } return C.apply(this, arguments);
  839. };
  840. F[PROTOTYPE] = C[PROTOTYPE];
  841. return F;
  842. // make static versions for prototype methods
  843. })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  844. // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
  845. if(IS_PROTO){
  846. (exports.virtual || (exports.virtual = {}))[key] = out;
  847. // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
  848. if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
  849. }
  850. }
  851. };
  852. // type bitmap
  853. $export.F = 1; // forced
  854. $export.G = 2; // global
  855. $export.S = 4; // static
  856. $export.P = 8; // proto
  857. $export.B = 16; // bind
  858. $export.W = 32; // wrap
  859. $export.U = 64; // safe
  860. $export.R = 128; // real proto method for `library`
  861. module.exports = $export;
  862. /***/ },
  863. /* 16 */
  864. /***/ function(module, exports) {
  865. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  866. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  867. ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
  868. if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
  869. /***/ },
  870. /* 17 */
  871. /***/ function(module, exports) {
  872. var core = module.exports = {version: '2.4.0'};
  873. if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
  874. /***/ },
  875. /* 18 */
  876. /***/ function(module, exports, __webpack_require__) {
  877. // optional / simple context binding
  878. var aFunction = __webpack_require__(19);
  879. module.exports = function(fn, that, length){
  880. aFunction(fn);
  881. if(that === undefined)return fn;
  882. switch(length){
  883. case 1: return function(a){
  884. return fn.call(that, a);
  885. };
  886. case 2: return function(a, b){
  887. return fn.call(that, a, b);
  888. };
  889. case 3: return function(a, b, c){
  890. return fn.call(that, a, b, c);
  891. };
  892. }
  893. return function(/* ...args */){
  894. return fn.apply(that, arguments);
  895. };
  896. };
  897. /***/ },
  898. /* 19 */
  899. /***/ function(module, exports) {
  900. module.exports = function(it){
  901. if(typeof it != 'function')throw TypeError(it + ' is not a function!');
  902. return it;
  903. };
  904. /***/ },
  905. /* 20 */
  906. /***/ function(module, exports, __webpack_require__) {
  907. var dP = __webpack_require__(21)
  908. , createDesc = __webpack_require__(29);
  909. module.exports = __webpack_require__(25) ? function(object, key, value){
  910. return dP.f(object, key, createDesc(1, value));
  911. } : function(object, key, value){
  912. object[key] = value;
  913. return object;
  914. };
  915. /***/ },
  916. /* 21 */
  917. /***/ function(module, exports, __webpack_require__) {
  918. var anObject = __webpack_require__(22)
  919. , IE8_DOM_DEFINE = __webpack_require__(24)
  920. , toPrimitive = __webpack_require__(28)
  921. , dP = Object.defineProperty;
  922. exports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes){
  923. anObject(O);
  924. P = toPrimitive(P, true);
  925. anObject(Attributes);
  926. if(IE8_DOM_DEFINE)try {
  927. return dP(O, P, Attributes);
  928. } catch(e){ /* empty */ }
  929. if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
  930. if('value' in Attributes)O[P] = Attributes.value;
  931. return O;
  932. };
  933. /***/ },
  934. /* 22 */
  935. /***/ function(module, exports, __webpack_require__) {
  936. var isObject = __webpack_require__(23);
  937. module.exports = function(it){
  938. if(!isObject(it))throw TypeError(it + ' is not an object!');
  939. return it;
  940. };
  941. /***/ },
  942. /* 23 */
  943. /***/ function(module, exports) {
  944. module.exports = function(it){
  945. return typeof it === 'object' ? it !== null : typeof it === 'function';
  946. };
  947. /***/ },
  948. /* 24 */
  949. /***/ function(module, exports, __webpack_require__) {
  950. module.exports = !__webpack_require__(25) && !__webpack_require__(26)(function(){
  951. return Object.defineProperty(__webpack_require__(27)('div'), 'a', {get: function(){ return 7; }}).a != 7;
  952. });
  953. /***/ },
  954. /* 25 */
  955. /***/ function(module, exports, __webpack_require__) {
  956. // Thank's IE8 for his funny defineProperty
  957. module.exports = !__webpack_require__(26)(function(){
  958. return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
  959. });
  960. /***/ },
  961. /* 26 */
  962. /***/ function(module, exports) {
  963. module.exports = function(exec){
  964. try {
  965. return !!exec();
  966. } catch(e){
  967. return true;
  968. }
  969. };
  970. /***/ },
  971. /* 27 */
  972. /***/ function(module, exports, __webpack_require__) {
  973. var isObject = __webpack_require__(23)
  974. , document = __webpack_require__(16).document
  975. // in old IE typeof document.createElement is 'object'
  976. , is = isObject(document) && isObject(document.createElement);
  977. module.exports = function(it){
  978. return is ? document.createElement(it) : {};
  979. };
  980. /***/ },
  981. /* 28 */
  982. /***/ function(module, exports, __webpack_require__) {
  983. // 7.1.1 ToPrimitive(input [, PreferredType])
  984. var isObject = __webpack_require__(23);
  985. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  986. // and the second argument - flag - preferred type is a string
  987. module.exports = function(it, S){
  988. if(!isObject(it))return it;
  989. var fn, val;
  990. if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
  991. if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
  992. if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
  993. throw TypeError("Can't convert object to primitive value");
  994. };
  995. /***/ },
  996. /* 29 */
  997. /***/ function(module, exports) {
  998. module.exports = function(bitmap, value){
  999. return {
  1000. enumerable : !(bitmap & 1),
  1001. configurable: !(bitmap & 2),
  1002. writable : !(bitmap & 4),
  1003. value : value
  1004. };
  1005. };
  1006. /***/ },
  1007. /* 30 */
  1008. /***/ function(module, exports, __webpack_require__) {
  1009. module.exports = __webpack_require__(20);
  1010. /***/ },
  1011. /* 31 */
  1012. /***/ function(module, exports) {
  1013. var hasOwnProperty = {}.hasOwnProperty;
  1014. module.exports = function(it, key){
  1015. return hasOwnProperty.call(it, key);
  1016. };
  1017. /***/ },
  1018. /* 32 */
  1019. /***/ function(module, exports) {
  1020. module.exports = {};
  1021. /***/ },
  1022. /* 33 */
  1023. /***/ function(module, exports, __webpack_require__) {
  1024. 'use strict';
  1025. var create = __webpack_require__(34)
  1026. , descriptor = __webpack_require__(29)
  1027. , setToStringTag = __webpack_require__(49)
  1028. , IteratorPrototype = {};
  1029. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  1030. __webpack_require__(20)(IteratorPrototype, __webpack_require__(50)('iterator'), function(){ return this; });
  1031. module.exports = function(Constructor, NAME, next){
  1032. Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
  1033. setToStringTag(Constructor, NAME + ' Iterator');
  1034. };
  1035. /***/ },
  1036. /* 34 */
  1037. /***/ function(module, exports, __webpack_require__) {
  1038. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  1039. var anObject = __webpack_require__(22)
  1040. , dPs = __webpack_require__(35)
  1041. , enumBugKeys = __webpack_require__(47)
  1042. , IE_PROTO = __webpack_require__(44)('IE_PROTO')
  1043. , Empty = function(){ /* empty */ }
  1044. , PROTOTYPE = 'prototype';
  1045. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1046. var createDict = function(){
  1047. // Thrash, waste and sodomy: IE GC bug
  1048. var iframe = __webpack_require__(27)('iframe')
  1049. , i = enumBugKeys.length
  1050. , lt = '<'
  1051. , gt = '>'
  1052. , iframeDocument;
  1053. iframe.style.display = 'none';
  1054. __webpack_require__(48).appendChild(iframe);
  1055. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  1056. // createDict = iframe.contentWindow.Object;
  1057. // html.removeChild(iframe);
  1058. iframeDocument = iframe.contentWindow.document;
  1059. iframeDocument.open();
  1060. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  1061. iframeDocument.close();
  1062. createDict = iframeDocument.F;
  1063. while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
  1064. return createDict();
  1065. };
  1066. module.exports = Object.create || function create(O, Properties){
  1067. var result;
  1068. if(O !== null){
  1069. Empty[PROTOTYPE] = anObject(O);
  1070. result = new Empty;
  1071. Empty[PROTOTYPE] = null;
  1072. // add "__proto__" for Object.getPrototypeOf polyfill
  1073. result[IE_PROTO] = O;
  1074. } else result = createDict();
  1075. return Properties === undefined ? result : dPs(result, Properties);
  1076. };
  1077. /***/ },
  1078. /* 35 */
  1079. /***/ function(module, exports, __webpack_require__) {
  1080. var dP = __webpack_require__(21)
  1081. , anObject = __webpack_require__(22)
  1082. , getKeys = __webpack_require__(36);
  1083. module.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties){
  1084. anObject(O);
  1085. var keys = getKeys(Properties)
  1086. , length = keys.length
  1087. , i = 0
  1088. , P;
  1089. while(length > i)dP.f(O, P = keys[i++], Properties[P]);
  1090. return O;
  1091. };
  1092. /***/ },
  1093. /* 36 */
  1094. /***/ function(module, exports, __webpack_require__) {
  1095. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  1096. var $keys = __webpack_require__(37)
  1097. , enumBugKeys = __webpack_require__(47);
  1098. module.exports = Object.keys || function keys(O){
  1099. return $keys(O, enumBugKeys);
  1100. };
  1101. /***/ },
  1102. /* 37 */
  1103. /***/ function(module, exports, __webpack_require__) {
  1104. var has = __webpack_require__(31)
  1105. , toIObject = __webpack_require__(38)
  1106. , arrayIndexOf = __webpack_require__(41)(false)
  1107. , IE_PROTO = __webpack_require__(44)('IE_PROTO');
  1108. module.exports = function(object, names){
  1109. var O = toIObject(object)
  1110. , i = 0
  1111. , result = []
  1112. , key;
  1113. for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
  1114. // Don't enum bug & hidden keys
  1115. while(names.length > i)if(has(O, key = names[i++])){
  1116. ~arrayIndexOf(result, key) || result.push(key);
  1117. }
  1118. return result;
  1119. };
  1120. /***/ },
  1121. /* 38 */
  1122. /***/ function(module, exports, __webpack_require__) {
  1123. // to indexed object, toObject with fallback for non-array-like ES3 strings
  1124. var IObject = __webpack_require__(39)
  1125. , defined = __webpack_require__(12);
  1126. module.exports = function(it){
  1127. return IObject(defined(it));
  1128. };
  1129. /***/ },
  1130. /* 39 */
  1131. /***/ function(module, exports, __webpack_require__) {
  1132. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  1133. var cof = __webpack_require__(40);
  1134. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
  1135. return cof(it) == 'String' ? it.split('') : Object(it);
  1136. };
  1137. /***/ },
  1138. /* 40 */
  1139. /***/ function(module, exports) {
  1140. var toString = {}.toString;
  1141. module.exports = function(it){
  1142. return toString.call(it).slice(8, -1);
  1143. };
  1144. /***/ },
  1145. /* 41 */
  1146. /***/ function(module, exports, __webpack_require__) {
  1147. // false -> Array#indexOf
  1148. // true -> Array#includes
  1149. var toIObject = __webpack_require__(38)
  1150. , toLength = __webpack_require__(42)
  1151. , toIndex = __webpack_require__(43);
  1152. module.exports = function(IS_INCLUDES){
  1153. return function($this, el, fromIndex){
  1154. var O = toIObject($this)
  1155. , length = toLength(O.length)
  1156. , index = toIndex(fromIndex, length)
  1157. , value;
  1158. // Array#includes uses SameValueZero equality algorithm
  1159. if(IS_INCLUDES && el != el)while(length > index){
  1160. value = O[index++];
  1161. if(value != value)return true;
  1162. // Array#toIndex ignores holes, Array#includes - not
  1163. } else for(;length > index; index++)if(IS_INCLUDES || index in O){
  1164. if(O[index] === el)return IS_INCLUDES || index || 0;
  1165. } return !IS_INCLUDES && -1;
  1166. };
  1167. };
  1168. /***/ },
  1169. /* 42 */
  1170. /***/ function(module, exports, __webpack_require__) {
  1171. // 7.1.15 ToLength
  1172. var toInteger = __webpack_require__(11)
  1173. , min = Math.min;
  1174. module.exports = function(it){
  1175. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  1176. };
  1177. /***/ },
  1178. /* 43 */
  1179. /***/ function(module, exports, __webpack_require__) {
  1180. var toInteger = __webpack_require__(11)
  1181. , max = Math.max
  1182. , min = Math.min;
  1183. module.exports = function(index, length){
  1184. index = toInteger(index);
  1185. return index < 0 ? max(index + length, 0) : min(index, length);
  1186. };
  1187. /***/ },
  1188. /* 44 */
  1189. /***/ function(module, exports, __webpack_require__) {
  1190. var shared = __webpack_require__(45)('keys')
  1191. , uid = __webpack_require__(46);
  1192. module.exports = function(key){
  1193. return shared[key] || (shared[key] = uid(key));
  1194. };
  1195. /***/ },
  1196. /* 45 */
  1197. /***/ function(module, exports, __webpack_require__) {
  1198. var global = __webpack_require__(16)
  1199. , SHARED = '__core-js_shared__'
  1200. , store = global[SHARED] || (global[SHARED] = {});
  1201. module.exports = function(key){
  1202. return store[key] || (store[key] = {});
  1203. };
  1204. /***/ },
  1205. /* 46 */
  1206. /***/ function(module, exports) {
  1207. var id = 0
  1208. , px = Math.random();
  1209. module.exports = function(key){
  1210. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  1211. };
  1212. /***/ },
  1213. /* 47 */
  1214. /***/ function(module, exports) {
  1215. // IE 8- don't enum bug keys
  1216. module.exports = (
  1217. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  1218. ).split(',');
  1219. /***/ },
  1220. /* 48 */
  1221. /***/ function(module, exports, __webpack_require__) {
  1222. module.exports = __webpack_require__(16).document && document.documentElement;
  1223. /***/ },
  1224. /* 49 */
  1225. /***/ function(module, exports, __webpack_require__) {
  1226. var def = __webpack_require__(21).f
  1227. , has = __webpack_require__(31)
  1228. , TAG = __webpack_require__(50)('toStringTag');
  1229. module.exports = function(it, tag, stat){
  1230. if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
  1231. };
  1232. /***/ },
  1233. /* 50 */
  1234. /***/ function(module, exports, __webpack_require__) {
  1235. var store = __webpack_require__(45)('wks')
  1236. , uid = __webpack_require__(46)
  1237. , Symbol = __webpack_require__(16).Symbol
  1238. , USE_SYMBOL = typeof Symbol == 'function';
  1239. var $exports = module.exports = function(name){
  1240. return store[name] || (store[name] =
  1241. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  1242. };
  1243. $exports.store = store;
  1244. /***/ },
  1245. /* 51 */
  1246. /***/ function(module, exports, __webpack_require__) {
  1247. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  1248. var has = __webpack_require__(31)
  1249. , toObject = __webpack_require__(52)
  1250. , IE_PROTO = __webpack_require__(44)('IE_PROTO')
  1251. , ObjectProto = Object.prototype;
  1252. module.exports = Object.getPrototypeOf || function(O){
  1253. O = toObject(O);
  1254. if(has(O, IE_PROTO))return O[IE_PROTO];
  1255. if(typeof O.constructor == 'function' && O instanceof O.constructor){
  1256. return O.constructor.prototype;
  1257. } return O instanceof Object ? ObjectProto : null;
  1258. };
  1259. /***/ },
  1260. /* 52 */
  1261. /***/ function(module, exports, __webpack_require__) {
  1262. // 7.1.13 ToObject(argument)
  1263. var defined = __webpack_require__(12);
  1264. module.exports = function(it){
  1265. return Object(defined(it));
  1266. };
  1267. /***/ },
  1268. /* 53 */
  1269. /***/ function(module, exports, __webpack_require__) {
  1270. __webpack_require__(54);
  1271. var global = __webpack_require__(16)
  1272. , hide = __webpack_require__(20)
  1273. , Iterators = __webpack_require__(32)
  1274. , TO_STRING_TAG = __webpack_require__(50)('toStringTag');
  1275. for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
  1276. var NAME = collections[i]
  1277. , Collection = global[NAME]
  1278. , proto = Collection && Collection.prototype;
  1279. if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
  1280. Iterators[NAME] = Iterators.Array;
  1281. }
  1282. /***/ },
  1283. /* 54 */
  1284. /***/ function(module, exports, __webpack_require__) {
  1285. 'use strict';
  1286. var addToUnscopables = __webpack_require__(55)
  1287. , step = __webpack_require__(56)
  1288. , Iterators = __webpack_require__(32)
  1289. , toIObject = __webpack_require__(38);
  1290. // 22.1.3.4 Array.prototype.entries()
  1291. // 22.1.3.13 Array.prototype.keys()
  1292. // 22.1.3.29 Array.prototype.values()
  1293. // 22.1.3.30 Array.prototype[@@iterator]()
  1294. module.exports = __webpack_require__(13)(Array, 'Array', function(iterated, kind){
  1295. this._t = toIObject(iterated); // target
  1296. this._i = 0; // next index
  1297. this._k = kind; // kind
  1298. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  1299. }, function(){
  1300. var O = this._t
  1301. , kind = this._k
  1302. , index = this._i++;
  1303. if(!O || index >= O.length){
  1304. this._t = undefined;
  1305. return step(1);
  1306. }
  1307. if(kind == 'keys' )return step(0, index);
  1308. if(kind == 'values')return step(0, O[index]);
  1309. return step(0, [index, O[index]]);
  1310. }, 'values');
  1311. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  1312. Iterators.Arguments = Iterators.Array;
  1313. addToUnscopables('keys');
  1314. addToUnscopables('values');
  1315. addToUnscopables('entries');
  1316. /***/ },
  1317. /* 55 */
  1318. /***/ function(module, exports) {
  1319. module.exports = function(){ /* empty */ };
  1320. /***/ },
  1321. /* 56 */
  1322. /***/ function(module, exports) {
  1323. module.exports = function(done, value){
  1324. return {value: value, done: !!done};
  1325. };
  1326. /***/ },
  1327. /* 57 */
  1328. /***/ function(module, exports, __webpack_require__) {
  1329. exports.f = __webpack_require__(50);
  1330. /***/ },
  1331. /* 58 */
  1332. /***/ function(module, exports, __webpack_require__) {
  1333. module.exports = { "default": __webpack_require__(59), __esModule: true };
  1334. /***/ },
  1335. /* 59 */
  1336. /***/ function(module, exports, __webpack_require__) {
  1337. __webpack_require__(60);
  1338. __webpack_require__(71);
  1339. __webpack_require__(72);
  1340. __webpack_require__(73);
  1341. module.exports = __webpack_require__(17).Symbol;
  1342. /***/ },
  1343. /* 60 */
  1344. /***/ function(module, exports, __webpack_require__) {
  1345. 'use strict';
  1346. // ECMAScript 6 symbols shim
  1347. var global = __webpack_require__(16)
  1348. , has = __webpack_require__(31)
  1349. , DESCRIPTORS = __webpack_require__(25)
  1350. , $export = __webpack_require__(15)
  1351. , redefine = __webpack_require__(30)
  1352. , META = __webpack_require__(61).KEY
  1353. , $fails = __webpack_require__(26)
  1354. , shared = __webpack_require__(45)
  1355. , setToStringTag = __webpack_require__(49)
  1356. , uid = __webpack_require__(46)
  1357. , wks = __webpack_require__(50)
  1358. , wksExt = __webpack_require__(57)
  1359. , wksDefine = __webpack_require__(62)
  1360. , keyOf = __webpack_require__(63)
  1361. , enumKeys = __webpack_require__(64)
  1362. , isArray = __webpack_require__(67)
  1363. , anObject = __webpack_require__(22)
  1364. , toIObject = __webpack_require__(38)
  1365. , toPrimitive = __webpack_require__(28)
  1366. , createDesc = __webpack_require__(29)
  1367. , _create = __webpack_require__(34)
  1368. , gOPNExt = __webpack_require__(68)
  1369. , $GOPD = __webpack_require__(70)
  1370. , $DP = __webpack_require__(21)
  1371. , $keys = __webpack_require__(36)
  1372. , gOPD = $GOPD.f
  1373. , dP = $DP.f
  1374. , gOPN = gOPNExt.f
  1375. , $Symbol = global.Symbol
  1376. , $JSON = global.JSON
  1377. , _stringify = $JSON && $JSON.stringify
  1378. , PROTOTYPE = 'prototype'
  1379. , HIDDEN = wks('_hidden')
  1380. , TO_PRIMITIVE = wks('toPrimitive')
  1381. , isEnum = {}.propertyIsEnumerable
  1382. , SymbolRegistry = shared('symbol-registry')
  1383. , AllSymbols = shared('symbols')
  1384. , OPSymbols = shared('op-symbols')
  1385. , ObjectProto = Object[PROTOTYPE]
  1386. , USE_NATIVE = typeof $Symbol == 'function'
  1387. , QObject = global.QObject;
  1388. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  1389. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  1390. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  1391. var setSymbolDesc = DESCRIPTORS && $fails(function(){
  1392. return _create(dP({}, 'a', {
  1393. get: function(){ return dP(this, 'a', {value: 7}).a; }
  1394. })).a != 7;
  1395. }) ? function(it, key, D){
  1396. var protoDesc = gOPD(ObjectProto, key);
  1397. if(protoDesc)delete ObjectProto[key];
  1398. dP(it, key, D);
  1399. if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
  1400. } : dP;
  1401. var wrap = function(tag){
  1402. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  1403. sym._k = tag;
  1404. return sym;
  1405. };
  1406. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
  1407. return typeof it == 'symbol';
  1408. } : function(it){
  1409. return it instanceof $Symbol;
  1410. };
  1411. var $defineProperty = function defineProperty(it, key, D){
  1412. if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
  1413. anObject(it);
  1414. key = toPrimitive(key, true);
  1415. anObject(D);
  1416. if(has(AllSymbols, key)){
  1417. if(!D.enumerable){
  1418. if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
  1419. it[HIDDEN][key] = true;
  1420. } else {
  1421. if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
  1422. D = _create(D, {enumerable: createDesc(0, false)});
  1423. } return setSymbolDesc(it, key, D);
  1424. } return dP(it, key, D);
  1425. };
  1426. var $defineProperties = function defineProperties(it, P){
  1427. anObject(it);
  1428. var keys = enumKeys(P = toIObject(P))
  1429. , i = 0
  1430. , l = keys.length
  1431. , key;
  1432. while(l > i)$defineProperty(it, key = keys[i++], P[key]);
  1433. return it;
  1434. };
  1435. var $create = function create(it, P){
  1436. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  1437. };
  1438. var $propertyIsEnumerable = function propertyIsEnumerable(key){
  1439. var E = isEnum.call(this, key = toPrimitive(key, true));
  1440. if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
  1441. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  1442. };
  1443. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
  1444. it = toIObject(it);
  1445. key = toPrimitive(key, true);
  1446. if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
  1447. var D = gOPD(it, key);
  1448. if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
  1449. return D;
  1450. };
  1451. var $getOwnPropertyNames = function getOwnPropertyNames(it){
  1452. var names = gOPN(toIObject(it))
  1453. , result = []
  1454. , i = 0
  1455. , key;
  1456. while(names.length > i){
  1457. if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
  1458. } return result;
  1459. };
  1460. var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
  1461. var IS_OP = it === ObjectProto
  1462. , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
  1463. , result = []
  1464. , i = 0
  1465. , key;
  1466. while(names.length > i){
  1467. if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
  1468. } return result;
  1469. };
  1470. // 19.4.1.1 Symbol([description])
  1471. if(!USE_NATIVE){
  1472. $Symbol = function Symbol(){
  1473. if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
  1474. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  1475. var $set = function(value){
  1476. if(this === ObjectProto)$set.call(OPSymbols, value);
  1477. if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
  1478. setSymbolDesc(this, tag, createDesc(1, value));
  1479. };
  1480. if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
  1481. return wrap(tag);
  1482. };
  1483. redefine($Symbol[PROTOTYPE], 'toString', function toString(){
  1484. return this._k;
  1485. });
  1486. $GOPD.f = $getOwnPropertyDescriptor;
  1487. $DP.f = $defineProperty;
  1488. __webpack_require__(69).f = gOPNExt.f = $getOwnPropertyNames;
  1489. __webpack_require__(66).f = $propertyIsEnumerable;
  1490. __webpack_require__(65).f = $getOwnPropertySymbols;
  1491. if(DESCRIPTORS && !__webpack_require__(14)){
  1492. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  1493. }
  1494. wksExt.f = function(name){
  1495. return wrap(wks(name));
  1496. }
  1497. }
  1498. $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
  1499. for(var symbols = (
  1500. // 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
  1501. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
  1502. ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
  1503. for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
  1504. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  1505. // 19.4.2.1 Symbol.for(key)
  1506. 'for': function(key){
  1507. return has(SymbolRegistry, key += '')
  1508. ? SymbolRegistry[key]
  1509. : SymbolRegistry[key] = $Symbol(key);
  1510. },
  1511. // 19.4.2.5 Symbol.keyFor(sym)
  1512. keyFor: function keyFor(key){
  1513. if(isSymbol(key))return keyOf(SymbolRegistry, key);
  1514. throw TypeError(key + ' is not a symbol!');
  1515. },
  1516. useSetter: function(){ setter = true; },
  1517. useSimple: function(){ setter = false; }
  1518. });
  1519. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  1520. // 19.1.2.2 Object.create(O [, Properties])
  1521. create: $create,
  1522. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  1523. defineProperty: $defineProperty,
  1524. // 19.1.2.3 Object.defineProperties(O, Properties)
  1525. defineProperties: $defineProperties,
  1526. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  1527. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  1528. // 19.1.2.7 Object.getOwnPropertyNames(O)
  1529. getOwnPropertyNames: $getOwnPropertyNames,
  1530. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  1531. getOwnPropertySymbols: $getOwnPropertySymbols
  1532. });
  1533. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  1534. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
  1535. var S = $Symbol();
  1536. // MS Edge converts symbol values to JSON as {}
  1537. // WebKit converts symbol values to JSON as null
  1538. // V8 throws on boxed symbols
  1539. return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
  1540. })), 'JSON', {
  1541. stringify: function stringify(it){
  1542. if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
  1543. var args = [it]
  1544. , i = 1
  1545. , replacer, $replacer;
  1546. while(arguments.length > i)args.push(arguments[i++]);
  1547. replacer = args[1];
  1548. if(typeof replacer == 'function')$replacer = replacer;
  1549. if($replacer || !isArray(replacer))replacer = function(key, value){
  1550. if($replacer)value = $replacer.call(this, key, value);
  1551. if(!isSymbol(value))return value;
  1552. };
  1553. args[1] = replacer;
  1554. return _stringify.apply($JSON, args);
  1555. }
  1556. });
  1557. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  1558. $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  1559. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  1560. setToStringTag($Symbol, 'Symbol');
  1561. // 20.2.1.9 Math[@@toStringTag]
  1562. setToStringTag(Math, 'Math', true);
  1563. // 24.3.3 JSON[@@toStringTag]
  1564. setToStringTag(global.JSON, 'JSON', true);
  1565. /***/ },
  1566. /* 61 */
  1567. /***/ function(module, exports, __webpack_require__) {
  1568. var META = __webpack_require__(46)('meta')
  1569. , isObject = __webpack_require__(23)
  1570. , has = __webpack_require__(31)
  1571. , setDesc = __webpack_require__(21).f
  1572. , id = 0;
  1573. var isExtensible = Object.isExtensible || function(){
  1574. return true;
  1575. };
  1576. var FREEZE = !__webpack_require__(26)(function(){
  1577. return isExtensible(Object.preventExtensions({}));
  1578. });
  1579. var setMeta = function(it){
  1580. setDesc(it, META, {value: {
  1581. i: 'O' + ++id, // object ID
  1582. w: {} // weak collections IDs
  1583. }});
  1584. };
  1585. var fastKey = function(it, create){
  1586. // return primitive with prefix
  1587. if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  1588. if(!has(it, META)){
  1589. // can't set metadata to uncaught frozen object
  1590. if(!isExtensible(it))return 'F';
  1591. // not necessary to add metadata
  1592. if(!create)return 'E';
  1593. // add missing metadata
  1594. setMeta(it);
  1595. // return object ID
  1596. } return it[META].i;
  1597. };
  1598. var getWeak = function(it, create){
  1599. if(!has(it, META)){
  1600. // can't set metadata to uncaught frozen object
  1601. if(!isExtensible(it))return true;
  1602. // not necessary to add metadata
  1603. if(!create)return false;
  1604. // add missing metadata
  1605. setMeta(it);
  1606. // return hash weak collections IDs
  1607. } return it[META].w;
  1608. };
  1609. // add metadata on freeze-family methods calling
  1610. var onFreeze = function(it){
  1611. if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
  1612. return it;
  1613. };
  1614. var meta = module.exports = {
  1615. KEY: META,
  1616. NEED: false,
  1617. fastKey: fastKey,
  1618. getWeak: getWeak,
  1619. onFreeze: onFreeze
  1620. };
  1621. /***/ },
  1622. /* 62 */
  1623. /***/ function(module, exports, __webpack_require__) {
  1624. var global = __webpack_require__(16)
  1625. , core = __webpack_require__(17)
  1626. , LIBRARY = __webpack_require__(14)
  1627. , wksExt = __webpack_require__(57)
  1628. , defineProperty = __webpack_require__(21).f;
  1629. module.exports = function(name){
  1630. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  1631. if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
  1632. };
  1633. /***/ },
  1634. /* 63 */
  1635. /***/ function(module, exports, __webpack_require__) {
  1636. var getKeys = __webpack_require__(36)
  1637. , toIObject = __webpack_require__(38);
  1638. module.exports = function(object, el){
  1639. var O = toIObject(object)
  1640. , keys = getKeys(O)
  1641. , length = keys.length
  1642. , index = 0
  1643. , key;
  1644. while(length > index)if(O[key = keys[index++]] === el)return key;
  1645. };
  1646. /***/ },
  1647. /* 64 */
  1648. /***/ function(module, exports, __webpack_require__) {
  1649. // all enumerable object keys, includes symbols
  1650. var getKeys = __webpack_require__(36)
  1651. , gOPS = __webpack_require__(65)
  1652. , pIE = __webpack_require__(66);
  1653. module.exports = function(it){
  1654. var result = getKeys(it)
  1655. , getSymbols = gOPS.f;
  1656. if(getSymbols){
  1657. var symbols = getSymbols(it)
  1658. , isEnum = pIE.f
  1659. , i = 0
  1660. , key;
  1661. while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
  1662. } return result;
  1663. };
  1664. /***/ },
  1665. /* 65 */
  1666. /***/ function(module, exports) {
  1667. exports.f = Object.getOwnPropertySymbols;
  1668. /***/ },
  1669. /* 66 */
  1670. /***/ function(module, exports) {
  1671. exports.f = {}.propertyIsEnumerable;
  1672. /***/ },
  1673. /* 67 */
  1674. /***/ function(module, exports, __webpack_require__) {
  1675. // 7.2.2 IsArray(argument)
  1676. var cof = __webpack_require__(40);
  1677. module.exports = Array.isArray || function isArray(arg){
  1678. return cof(arg) == 'Array';
  1679. };
  1680. /***/ },
  1681. /* 68 */
  1682. /***/ function(module, exports, __webpack_require__) {
  1683. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  1684. var toIObject = __webpack_require__(38)
  1685. , gOPN = __webpack_require__(69).f
  1686. , toString = {}.toString;
  1687. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  1688. ? Object.getOwnPropertyNames(window) : [];
  1689. var getWindowNames = function(it){
  1690. try {
  1691. return gOPN(it);
  1692. } catch(e){
  1693. return windowNames.slice();
  1694. }
  1695. };
  1696. module.exports.f = function getOwnPropertyNames(it){
  1697. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  1698. };
  1699. /***/ },
  1700. /* 69 */
  1701. /***/ function(module, exports, __webpack_require__) {
  1702. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  1703. var $keys = __webpack_require__(37)
  1704. , hiddenKeys = __webpack_require__(47).concat('length', 'prototype');
  1705. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
  1706. return $keys(O, hiddenKeys);
  1707. };
  1708. /***/ },
  1709. /* 70 */
  1710. /***/ function(module, exports, __webpack_require__) {
  1711. var pIE = __webpack_require__(66)
  1712. , createDesc = __webpack_require__(29)
  1713. , toIObject = __webpack_require__(38)
  1714. , toPrimitive = __webpack_require__(28)
  1715. , has = __webpack_require__(31)
  1716. , IE8_DOM_DEFINE = __webpack_require__(24)
  1717. , gOPD = Object.getOwnPropertyDescriptor;
  1718. exports.f = __webpack_require__(25) ? gOPD : function getOwnPropertyDescriptor(O, P){
  1719. O = toIObject(O);
  1720. P = toPrimitive(P, true);
  1721. if(IE8_DOM_DEFINE)try {
  1722. return gOPD(O, P);
  1723. } catch(e){ /* empty */ }
  1724. if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
  1725. };
  1726. /***/ },
  1727. /* 71 */
  1728. /***/ function(module, exports) {
  1729. /***/ },
  1730. /* 72 */
  1731. /***/ function(module, exports, __webpack_require__) {
  1732. __webpack_require__(62)('asyncIterator');
  1733. /***/ },
  1734. /* 73 */
  1735. /***/ function(module, exports, __webpack_require__) {
  1736. __webpack_require__(62)('observable');
  1737. /***/ },
  1738. /* 74 */
  1739. /***/ function(module, exports, __webpack_require__) {
  1740. module.exports = { "default": __webpack_require__(75), __esModule: true };
  1741. /***/ },
  1742. /* 75 */
  1743. /***/ function(module, exports, __webpack_require__) {
  1744. __webpack_require__(53);
  1745. __webpack_require__(9);
  1746. module.exports = __webpack_require__(76);
  1747. /***/ },
  1748. /* 76 */
  1749. /***/ function(module, exports, __webpack_require__) {
  1750. var anObject = __webpack_require__(22)
  1751. , get = __webpack_require__(77);
  1752. module.exports = __webpack_require__(17).getIterator = function(it){
  1753. var iterFn = get(it);
  1754. if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
  1755. return anObject(iterFn.call(it));
  1756. };
  1757. /***/ },
  1758. /* 77 */
  1759. /***/ function(module, exports, __webpack_require__) {
  1760. var classof = __webpack_require__(78)
  1761. , ITERATOR = __webpack_require__(50)('iterator')
  1762. , Iterators = __webpack_require__(32);
  1763. module.exports = __webpack_require__(17).getIteratorMethod = function(it){
  1764. if(it != undefined)return it[ITERATOR]
  1765. || it['@@iterator']
  1766. || Iterators[classof(it)];
  1767. };
  1768. /***/ },
  1769. /* 78 */
  1770. /***/ function(module, exports, __webpack_require__) {
  1771. // getting tag from 19.1.3.6 Object.prototype.toString()
  1772. var cof = __webpack_require__(40)
  1773. , TAG = __webpack_require__(50)('toStringTag')
  1774. // ES3 wrong here
  1775. , ARG = cof(function(){ return arguments; }()) == 'Arguments';
  1776. // fallback for IE11 Script Access Denied error
  1777. var tryGet = function(it, key){
  1778. try {
  1779. return it[key];
  1780. } catch(e){ /* empty */ }
  1781. };
  1782. module.exports = function(it){
  1783. var O, T, B;
  1784. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1785. // @@toStringTag case
  1786. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  1787. // builtinTag case
  1788. : ARG ? cof(O)
  1789. // ES3 arguments fallback
  1790. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  1791. };
  1792. /***/ },
  1793. /* 79 */
  1794. /***/ function(module, exports, __webpack_require__) {
  1795. module.exports = { "default": __webpack_require__(80), __esModule: true };
  1796. /***/ },
  1797. /* 80 */
  1798. /***/ function(module, exports, __webpack_require__) {
  1799. __webpack_require__(9);
  1800. __webpack_require__(81);
  1801. module.exports = __webpack_require__(17).Array.from;
  1802. /***/ },
  1803. /* 81 */
  1804. /***/ function(module, exports, __webpack_require__) {
  1805. 'use strict';
  1806. var ctx = __webpack_require__(18)
  1807. , $export = __webpack_require__(15)
  1808. , toObject = __webpack_require__(52)
  1809. , call = __webpack_require__(82)
  1810. , isArrayIter = __webpack_require__(83)
  1811. , toLength = __webpack_require__(42)
  1812. , createProperty = __webpack_require__(84)
  1813. , getIterFn = __webpack_require__(77);
  1814. $export($export.S + $export.F * !__webpack_require__(85)(function(iter){ Array.from(iter); }), 'Array', {
  1815. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  1816. from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
  1817. var O = toObject(arrayLike)
  1818. , C = typeof this == 'function' ? this : Array
  1819. , aLen = arguments.length
  1820. , mapfn = aLen > 1 ? arguments[1] : undefined
  1821. , mapping = mapfn !== undefined
  1822. , index = 0
  1823. , iterFn = getIterFn(O)
  1824. , length, result, step, iterator;
  1825. if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  1826. // if object isn't iterable or it's array with default iterator - use simple case
  1827. if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
  1828. for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
  1829. createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
  1830. }
  1831. } else {
  1832. length = toLength(O.length);
  1833. for(result = new C(length); length > index; index++){
  1834. createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  1835. }
  1836. }
  1837. result.length = index;
  1838. return result;
  1839. }
  1840. });
  1841. /***/ },
  1842. /* 82 */
  1843. /***/ function(module, exports, __webpack_require__) {
  1844. // call something on iterator step with safe closing on error
  1845. var anObject = __webpack_require__(22);
  1846. module.exports = function(iterator, fn, value, entries){
  1847. try {
  1848. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  1849. // 7.4.6 IteratorClose(iterator, completion)
  1850. } catch(e){
  1851. var ret = iterator['return'];
  1852. if(ret !== undefined)anObject(ret.call(iterator));
  1853. throw e;
  1854. }
  1855. };
  1856. /***/ },
  1857. /* 83 */
  1858. /***/ function(module, exports, __webpack_require__) {
  1859. // check on default Array iterator
  1860. var Iterators = __webpack_require__(32)
  1861. , ITERATOR = __webpack_require__(50)('iterator')
  1862. , ArrayProto = Array.prototype;
  1863. module.exports = function(it){
  1864. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  1865. };
  1866. /***/ },
  1867. /* 84 */
  1868. /***/ function(module, exports, __webpack_require__) {
  1869. 'use strict';
  1870. var $defineProperty = __webpack_require__(21)
  1871. , createDesc = __webpack_require__(29);
  1872. module.exports = function(object, index, value){
  1873. if(index in object)$defineProperty.f(object, index, createDesc(0, value));
  1874. else object[index] = value;
  1875. };
  1876. /***/ },
  1877. /* 85 */
  1878. /***/ function(module, exports, __webpack_require__) {
  1879. var ITERATOR = __webpack_require__(50)('iterator')
  1880. , SAFE_CLOSING = false;
  1881. try {
  1882. var riter = [7][ITERATOR]();
  1883. riter['return'] = function(){ SAFE_CLOSING = true; };
  1884. Array.from(riter, function(){ throw 2; });
  1885. } catch(e){ /* empty */ }
  1886. module.exports = function(exec, skipClosing){
  1887. if(!skipClosing && !SAFE_CLOSING)return false;
  1888. var safe = false;
  1889. try {
  1890. var arr = [7]
  1891. , iter = arr[ITERATOR]();
  1892. iter.next = function(){ return {done: safe = true}; };
  1893. arr[ITERATOR] = function(){ return iter; };
  1894. exec(arr);
  1895. } catch(e){ /* empty */ }
  1896. return safe;
  1897. };
  1898. /***/ },
  1899. /* 86 */
  1900. /***/ function(module, exports, __webpack_require__) {
  1901. module.exports = { "default": __webpack_require__(87), __esModule: true };
  1902. /***/ },
  1903. /* 87 */
  1904. /***/ function(module, exports, __webpack_require__) {
  1905. __webpack_require__(88);
  1906. module.exports = __webpack_require__(17).Object.assign;
  1907. /***/ },
  1908. /* 88 */
  1909. /***/ function(module, exports, __webpack_require__) {
  1910. // 19.1.3.1 Object.assign(target, source)
  1911. var $export = __webpack_require__(15);
  1912. $export($export.S + $export.F, 'Object', {assign: __webpack_require__(89)});
  1913. /***/ },
  1914. /* 89 */
  1915. /***/ function(module, exports, __webpack_require__) {
  1916. 'use strict';
  1917. // 19.1.2.1 Object.assign(target, source, ...)
  1918. var getKeys = __webpack_require__(36)
  1919. , gOPS = __webpack_require__(65)
  1920. , pIE = __webpack_require__(66)
  1921. , toObject = __webpack_require__(52)
  1922. , IObject = __webpack_require__(39)
  1923. , $assign = Object.assign;
  1924. // should work with symbols and should have deterministic property order (V8 bug)
  1925. module.exports = !$assign || __webpack_require__(26)(function(){
  1926. var A = {}
  1927. , B = {}
  1928. , S = Symbol()
  1929. , K = 'abcdefghijklmnopqrst';
  1930. A[S] = 7;
  1931. K.split('').forEach(function(k){ B[k] = k; });
  1932. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  1933. }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
  1934. var T = toObject(target)
  1935. , aLen = arguments.length
  1936. , index = 1
  1937. , getSymbols = gOPS.f
  1938. , isEnum = pIE.f;
  1939. while(aLen > index){
  1940. var S = IObject(arguments[index++])
  1941. , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
  1942. , length = keys.length
  1943. , j = 0
  1944. , key;
  1945. while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
  1946. } return T;
  1947. } : $assign;
  1948. /***/ },
  1949. /* 90 */
  1950. /***/ function(module, exports) {
  1951. "use strict";
  1952. exports.__esModule = true;
  1953. exports.default = function (instance, Constructor) {
  1954. if (!(instance instanceof Constructor)) {
  1955. throw new TypeError("Cannot call a class as a function");
  1956. }
  1957. };
  1958. /***/ },
  1959. /* 91 */
  1960. /***/ function(module, exports, __webpack_require__) {
  1961. "use strict";
  1962. exports.__esModule = true;
  1963. var _defineProperty = __webpack_require__(92);
  1964. var _defineProperty2 = _interopRequireDefault(_defineProperty);
  1965. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1966. exports.default = function () {
  1967. function defineProperties(target, props) {
  1968. for (var i = 0; i < props.length; i++) {
  1969. var descriptor = props[i];
  1970. descriptor.enumerable = descriptor.enumerable || false;
  1971. descriptor.configurable = true;
  1972. if ("value" in descriptor) descriptor.writable = true;
  1973. (0, _defineProperty2.default)(target, descriptor.key, descriptor);
  1974. }
  1975. }
  1976. return function (Constructor, protoProps, staticProps) {
  1977. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  1978. if (staticProps) defineProperties(Constructor, staticProps);
  1979. return Constructor;
  1980. };
  1981. }();
  1982. /***/ },
  1983. /* 92 */
  1984. /***/ function(module, exports, __webpack_require__) {
  1985. module.exports = { "default": __webpack_require__(93), __esModule: true };
  1986. /***/ },
  1987. /* 93 */
  1988. /***/ function(module, exports, __webpack_require__) {
  1989. __webpack_require__(94);
  1990. var $Object = __webpack_require__(17).Object;
  1991. module.exports = function defineProperty(it, key, desc){
  1992. return $Object.defineProperty(it, key, desc);
  1993. };
  1994. /***/ },
  1995. /* 94 */
  1996. /***/ function(module, exports, __webpack_require__) {
  1997. var $export = __webpack_require__(15);
  1998. // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
  1999. $export($export.S + $export.F * !__webpack_require__(25), 'Object', {defineProperty: __webpack_require__(21).f});
  2000. /***/ },
  2001. /* 95 */
  2002. /***/ function(module, exports, __webpack_require__) {
  2003. 'use strict';
  2004. Object.defineProperty(exports, "__esModule", {
  2005. value: true
  2006. });
  2007. var _from = __webpack_require__(79);
  2008. var _from2 = _interopRequireDefault(_from);
  2009. var _classCallCheck2 = __webpack_require__(90);
  2010. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  2011. var _createClass2 = __webpack_require__(91);
  2012. var _createClass3 = _interopRequireDefault(_createClass2);
  2013. var _dragulaWithAnimation = __webpack_require__(96);
  2014. var _dragulaWithAnimation2 = _interopRequireDefault(_dragulaWithAnimation);
  2015. var _classes = __webpack_require__(108);
  2016. var _classes2 = _interopRequireDefault(_classes);
  2017. var _util = __webpack_require__(109);
  2018. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2019. var isTest = false;
  2020. var bodyPaddingRight = void 0;
  2021. var bodyOverflow = void 0;
  2022. var Dragger = function () {
  2023. function Dragger(_ref) {
  2024. var _this = this;
  2025. var originTable = _ref.originTable,
  2026. mode = _ref.mode;
  2027. (0, _classCallCheck3.default)(this, Dragger);
  2028. var dragger = originTable.dragger,
  2029. cellIndex = originTable.cellIndex,
  2030. originEl = originTable.el,
  2031. options = originTable.options;
  2032. var fakeTables = this.fakeTables = buildTables(originEl, mode);
  2033. bodyPaddingRight = parseInt(document.body.style.paddingRight, 0) || 0;
  2034. bodyOverflow = document.body.style.overflow;
  2035. this.options = options;
  2036. this.mode = mode;
  2037. this.originTable = originTable;
  2038. this.dragger = dragger;
  2039. this.index = mode === 'column' ? cellIndex.x : cellIndex.y;
  2040. ['destroy', 'onDrag', 'onDragend', 'onShadow', 'onOut'].forEach(function (m) {
  2041. _this[m] = _this[m].bind(_this);
  2042. });
  2043. this.el = fakeTables.reduce(function (previous, current) {
  2044. var li = document.createElement('li');
  2045. li.appendChild(current);
  2046. return previous.appendChild(li) && previous;
  2047. }, document.createElement('ul'));
  2048. this.drake = (0, _dragulaWithAnimation2.default)([this.el], {
  2049. animation: 300,
  2050. staticClass: _classes2.default.static,
  2051. direction: mode === 'column' ? 'horizontal' : 'vertical'
  2052. }).on('drag', this.onDrag).on('dragend', this.onDragend).on('shadow', this.onShadow).on('out', this.onOut);
  2053. this.renderEl();
  2054. this.dispatchMousedown();
  2055. }
  2056. (0, _createClass3.default)(Dragger, [{
  2057. key: 'onDrag',
  2058. value: function onDrag() {
  2059. (0, _util.css)(document.body, { overflow: 'hidden' });
  2060. var barWidth = (0, _util.getScrollBarWidth)();
  2061. this.dragger.dragging = true;
  2062. if (barWidth) {
  2063. (0, _util.css)(document.body, { 'padding-right': barWidth + bodyPaddingRight + 'px' });
  2064. }
  2065. (0, _util.touchy)(document, 'remove', 'mouseup', this.destroy);
  2066. this.dragger.emit('drag', this.originTable.el, this.options.mode);
  2067. }
  2068. }, {
  2069. key: 'onDragend',
  2070. value: function onDragend(droppedItem) {
  2071. var originEl = this.originTable.el,
  2072. dragger = this.dragger,
  2073. index = this.index,
  2074. mode = this.mode,
  2075. el = this.el;
  2076. (0, _util.css)(document.body, { overflow: bodyOverflow, 'padding-right': bodyPaddingRight + 'px' });
  2077. this.dragger.dragging = false;
  2078. var from = index;
  2079. var to = (0, _from2.default)(el.children).indexOf(droppedItem);
  2080. this.destroy();
  2081. dragger.emit('drop', from, to, originEl, mode);
  2082. }
  2083. }, {
  2084. key: 'onShadow',
  2085. value: function onShadow(draggingItem) {
  2086. var originEl = this.originTable.el,
  2087. dragger = this.dragger,
  2088. index = this.index,
  2089. el = this.el,
  2090. mode = this.mode;
  2091. var from = index;
  2092. var to = (0, _from2.default)(el.children).indexOf(draggingItem);
  2093. dragger.emit('shadowMove', from, to, originEl, mode);
  2094. }
  2095. }, {
  2096. key: 'onOut',
  2097. value: function onOut() {
  2098. this.dragger.dragging = false;
  2099. this.dragger.emit('out', this.originTable.el, this.mode);
  2100. }
  2101. }, {
  2102. key: 'destroy',
  2103. value: function destroy() {
  2104. var _this2 = this;
  2105. (0, _util.remove)(document, 'mouseup', this.destroy);
  2106. this.el.parentElement.classList.remove(_classes2.default.dragging);
  2107. if (!isTest) {
  2108. this.el.parentElement.removeChild(this.el);
  2109. }
  2110. setTimeout(function () {
  2111. _this2.drake.destroy();
  2112. }, 0);
  2113. }
  2114. }, {
  2115. key: 'dispatchMousedown',
  2116. value: function dispatchMousedown() {
  2117. var el = this.el,
  2118. index = this.index;
  2119. el.children[index].dispatchEvent((0, _util.getTouchyEvent)());
  2120. }
  2121. }, {
  2122. key: 'renderEl',
  2123. value: function renderEl() {
  2124. var _this3 = this;
  2125. var mode = this.mode,
  2126. el = this.el,
  2127. originEl = this.originTable.el;
  2128. this.sizeFakes();
  2129. (0, _util.css)(el, {
  2130. position: 'absolute',
  2131. top: originEl.offsetTop + 'px',
  2132. left: originEl.offsetLeft + 'px'
  2133. });
  2134. (0, _util.insertBeforeSibling)({ target: el, origin: originEl });
  2135. var s = window.getComputedStyle(originEl).getPropertyValue('border-spacing').split(' ')[0];
  2136. var attr = mode === 'column' ? 'margin-right' : 'margin-bottom';
  2137. var l = el.children.length;
  2138. (0, _from2.default)(el.children).forEach(function (li, dex) {
  2139. var table = li && li.querySelector('table');
  2140. if (_this3.options.onlyBody && mode === 'row' && !(0, _from2.default)(table.children).some(function (o) {
  2141. return o.nodeName === 'TBODY';
  2142. })) {
  2143. li.classList.add(_classes2.default.static);
  2144. }
  2145. if (s && dex < l - 1) {
  2146. li.style[attr] = '-' + s;
  2147. }
  2148. });
  2149. el.parentElement.classList.add(_classes2.default.dragging);
  2150. el.classList.add(_classes2.default.draggableTable);
  2151. el.classList.add('sindu_' + mode);
  2152. }
  2153. }, {
  2154. key: 'sizeFakes',
  2155. value: function sizeFakes() {
  2156. return this.mode === 'column' ? this.sizeColumnFake() : this.sizeRowFake();
  2157. }
  2158. }, {
  2159. key: 'sizeColumnFake',
  2160. value: function sizeColumnFake() {
  2161. var fakeTables = this.fakeTables,
  2162. originEl = this.originTable.el;
  2163. (0, _from2.default)((0, _util.getLongestRow)(originEl).children).forEach(function (cell, index) {
  2164. var w = cell.getBoundingClientRect().width;
  2165. var t = fakeTables[index];
  2166. (0, _util.css)(t, { width: w + 'px' });
  2167. (0, _util.css)(t.rows[0].children[0], { width: w + 'px' });
  2168. });
  2169. var rowHeights = (0, _from2.default)(originEl.rows).map(function (row) {
  2170. return row.children[0].getBoundingClientRect().height;
  2171. });
  2172. fakeTables.forEach(function (t) {
  2173. (0, _from2.default)(t.rows).forEach(function (row, index) {
  2174. (0, _util.css)(row, { height: rowHeights[index] + 'px' });
  2175. });
  2176. });
  2177. }
  2178. }, {
  2179. key: 'sizeRowFake',
  2180. value: function sizeRowFake() {
  2181. var fakeTables = this.fakeTables,
  2182. originEl = this.originTable.el;
  2183. var cells = (0, _util.getLongestRow)(originEl).children;
  2184. var w = originEl.getBoundingClientRect().width;
  2185. fakeTables.forEach(function (t) {
  2186. (0, _util.css)(t, { width: w + 'px' });
  2187. (0, _from2.default)(t.rows[0].children).forEach(function (cell, i) {
  2188. (0, _util.css)(cell, { width: cells[i].getBoundingClientRect().width + 'px' });
  2189. });
  2190. });
  2191. }
  2192. }]);
  2193. return Dragger;
  2194. }();
  2195. exports.default = Dragger;
  2196. function origin2DragItem(liTable) {
  2197. (0, _util.css)(liTable, { 'table-layout': 'fixed', width: 'initial', height: 'initial', padding: 0, margin: 0 });
  2198. ['width', 'height', 'id'].forEach(function (p) {
  2199. liTable.removeAttribute(p);
  2200. });
  2201. liTable.classList.remove(_classes2.default.originTable);
  2202. (0, _from2.default)(liTable.querySelectorAll('col')).forEach(function (col) {
  2203. col.removeAttribute('width');
  2204. (0, _util.css)(col, { width: 'initial' });
  2205. });
  2206. }
  2207. function getColumnAsTableByIndex(table, index) {
  2208. var cTable = table.cloneNode(true);
  2209. origin2DragItem(cTable);
  2210. var cols = cTable.querySelectorAll('col');
  2211. if (cols.length) {
  2212. (0, _from2.default)(cols).forEach(function (col, dex) {
  2213. if (dex !== index) {
  2214. col.parentElement.removeChild(col);
  2215. }
  2216. });
  2217. }
  2218. (0, _from2.default)(cTable.rows).forEach(function (row) {
  2219. var target = row.children[index];
  2220. (0, _util.empty)(row);
  2221. if (target) {
  2222. row.appendChild(target);
  2223. }
  2224. });
  2225. return cTable;
  2226. }
  2227. function buildRowTables(table) {
  2228. return (0, _from2.default)(table.rows).map(function (row) {
  2229. var cTable = table.cloneNode(true);
  2230. origin2DragItem(cTable);
  2231. (0, _from2.default)(cTable.children).forEach(function (c) {
  2232. var nodeName = c.nodeName;
  2233. if (nodeName !== 'COL' && nodeName !== 'COLGROUP') {
  2234. cTable.removeChild(c);
  2235. }
  2236. });
  2237. var organ = row.parentElement.cloneNode();
  2238. organ.innerHTML = '';
  2239. organ.appendChild(row.cloneNode(true));
  2240. cTable.appendChild(organ);
  2241. return cTable;
  2242. });
  2243. }
  2244. function buildColumnTables(table) {
  2245. return (0, _from2.default)((0, _util.getLongestRow)(table).children).map(function (cell, index) {
  2246. return getColumnAsTableByIndex(table, index);
  2247. });
  2248. }
  2249. function buildTables(table, mode) {
  2250. return mode === 'column' ? buildColumnTables(table) : buildRowTables(table);
  2251. }
  2252. /***/ },
  2253. /* 96 */
  2254. /***/ function(module, exports, __webpack_require__) {
  2255. /* WEBPACK VAR INJECTION */(function(global) {'use strict';
  2256. var emitter = __webpack_require__(97);
  2257. var crossvent = __webpack_require__(104);
  2258. var classes = __webpack_require__(107);
  2259. var doc = document;
  2260. var documentElement = doc.documentElement;
  2261. var oldCoord = 0;
  2262. function dragula (initialContainers, options) {
  2263. var len = arguments.length;
  2264. if (len === 1 && Array.isArray(initialContainers) === false) {
  2265. options = initialContainers;
  2266. initialContainers = [];
  2267. }
  2268. var _mirror; // mirror image
  2269. var _source; // source container
  2270. var _item; // item being dragged
  2271. var _offsetX; // reference x
  2272. var _offsetY; // reference y
  2273. var _moveX; // reference move x
  2274. var _moveY; // reference move y
  2275. var _initialSibling; // reference sibling when grabbed
  2276. var _currentSibling; // reference sibling now
  2277. var _copy; // item used for copying
  2278. var _renderTimer; // timer for setTimeout renderMirrorImage
  2279. var _lastDropTarget = null; // last container item was over
  2280. var _grabbed; // holds mousedown context until first mousemove
  2281. var o = options || {};
  2282. if (o.moves === void 0) {
  2283. o.moves = always;
  2284. }
  2285. if (o.accepts === void 0) {
  2286. o.accepts = always;
  2287. }
  2288. if (o.invalid === void 0) {
  2289. o.invalid = invalidTarget;
  2290. }
  2291. if (o.containers === void 0) {
  2292. o.containers = initialContainers || [];
  2293. }
  2294. if (o.isContainer === void 0) {
  2295. o.isContainer = never;
  2296. }
  2297. if (o.copy === void 0) {
  2298. o.copy = false;
  2299. }
  2300. if (o.copySortSource === void 0) {
  2301. o.copySortSource = false;
  2302. }
  2303. if (o.revertOnSpill === void 0) {
  2304. o.revertOnSpill = false;
  2305. }
  2306. if (o.removeOnSpill === void 0) {
  2307. o.removeOnSpill = false;
  2308. }
  2309. if (o.direction === void 0) {
  2310. o.direction = 'vertical';
  2311. }
  2312. if (o.ignoreInputTextSelection === void 0) {
  2313. o.ignoreInputTextSelection = true;
  2314. }
  2315. if (o.mirrorContainer === void 0) {
  2316. o.mirrorContainer = doc.body;
  2317. }
  2318. if (o.animation === void 0) {
  2319. o.animation = false;
  2320. }
  2321. // 设置静态不动项目
  2322. if (o.staticClass === void 0) {
  2323. o.staticClass = '';
  2324. }
  2325. var drake = emitter({
  2326. containers: o.containers,
  2327. start: manualStart,
  2328. end: end,
  2329. cancel: cancel,
  2330. remove: remove,
  2331. destroy: destroy,
  2332. canMove: canMove,
  2333. dragging: false
  2334. });
  2335. if (o.removeOnSpill === true) {
  2336. drake.on('over', spillOver).on('out', spillOut);
  2337. }
  2338. events();
  2339. return drake;
  2340. function isContainer (el) {
  2341. return drake.containers.indexOf(el) !== -1 || o.isContainer(el);
  2342. }
  2343. function events (remove) {
  2344. var op = remove ? 'remove' : 'add';
  2345. touchy(documentElement, op, 'mousedown', grab);
  2346. touchy(documentElement, op, 'mouseup', release);
  2347. }
  2348. function eventualMovements (remove) {
  2349. var op = remove ? 'remove' : 'add';
  2350. touchy(documentElement, op, 'mousemove', startBecauseMouseMoved);
  2351. }
  2352. function movements (remove) {
  2353. var op = remove ? 'remove' : 'add';
  2354. crossvent[op](documentElement, 'selectstart', preventGrabbed); // IE8
  2355. crossvent[op](documentElement, 'click', preventGrabbed);
  2356. }
  2357. function destroy () {
  2358. events(true);
  2359. release({});
  2360. }
  2361. function preventGrabbed (e) {
  2362. if (_grabbed) {
  2363. e.preventDefault();
  2364. }
  2365. }
  2366. function grab (e) {
  2367. _moveX = e.clientX;
  2368. _moveY = e.clientY;
  2369. var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey;
  2370. if (ignore) {
  2371. return; // we only care about honest-to-god left clicks and touch events
  2372. }
  2373. var item = e.target;
  2374. var context = canStart(item);
  2375. if (!context) {
  2376. return;
  2377. }
  2378. _grabbed = context;
  2379. eventualMovements();
  2380. if (e.type === 'mousedown') {
  2381. if (isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208
  2382. item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176
  2383. } else {
  2384. e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155
  2385. }
  2386. }
  2387. }
  2388. function startBecauseMouseMoved (e) {
  2389. if (!_grabbed) {
  2390. return;
  2391. }
  2392. if (whichMouseButton(e) === 0) {
  2393. release({});
  2394. return; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope
  2395. }
  2396. // truthy check fixes #239, equality fixes #207
  2397. if (e.clientX !== void 0 && e.clientX === _moveX && e.clientY !== void 0 && e.clientY === _moveY) {
  2398. return;
  2399. }
  2400. if (o.ignoreInputTextSelection) {
  2401. var clientX = getCoord('clientX', e);
  2402. var clientY = getCoord('clientY', e);
  2403. var elementBehindCursor = doc.elementFromPoint(clientX, clientY);
  2404. if (isInput(elementBehindCursor)) {
  2405. return;
  2406. }
  2407. }
  2408. var grabbed = _grabbed; // call to end() unsets _grabbed
  2409. eventualMovements(true);
  2410. movements();
  2411. end();
  2412. start(grabbed);
  2413. var offset = getOffset(_item);
  2414. _offsetX = getCoord('pageX', e) - offset.left;
  2415. _offsetY = getCoord('pageY', e) - offset.top;
  2416. classes.add(_copy || _item, 'gu-transit');
  2417. renderMirrorImage();
  2418. drag(e);
  2419. }
  2420. function canStart (item) {
  2421. if (drake.dragging && _mirror) {
  2422. return;
  2423. }
  2424. if (isContainer(item)) {
  2425. return; // don't drag container itself
  2426. }
  2427. var handle = item;
  2428. while (getParent(item) && isContainer(getParent(item)) === false) {
  2429. if (o.invalid(item, handle)) {
  2430. return;
  2431. }
  2432. item = getParent(item); // drag target should be a top element
  2433. if (!item) {
  2434. return;
  2435. }
  2436. }
  2437. var source = getParent(item);
  2438. if (!source) {
  2439. return;
  2440. }
  2441. if (o.invalid(item, handle) || (o.staticClass && item.classList.contains(o.staticClass))) {
  2442. return;
  2443. }
  2444. var movable = o.moves(item, source, handle, nextEl(item));
  2445. if (!movable) {
  2446. return;
  2447. }
  2448. return {
  2449. item: item,
  2450. source: source
  2451. };
  2452. }
  2453. function canMove (item) {
  2454. return !!canStart(item);
  2455. }
  2456. function manualStart (item) {
  2457. var context = canStart(item);
  2458. if (context) {
  2459. start(context);
  2460. }
  2461. }
  2462. function start (context) {
  2463. if (isCopy(context.item, context.source)) {
  2464. _copy = context.item.cloneNode(true);
  2465. drake.emit('cloned', _copy, context.item, 'copy');
  2466. }
  2467. _source = context.source;
  2468. _item = context.item;
  2469. _initialSibling = _currentSibling = nextEl(context.item);
  2470. drake.dragging = true;
  2471. drake.emit('drag', _item, _source);
  2472. }
  2473. function invalidTarget () {
  2474. return false;
  2475. }
  2476. function end () {
  2477. if (!drake.dragging) {
  2478. return;
  2479. }
  2480. var item = _copy || _item;
  2481. drop(item, getParent(item));
  2482. }
  2483. function ungrab () {
  2484. _grabbed = false;
  2485. eventualMovements(true);
  2486. movements(true);
  2487. }
  2488. function release (e) {
  2489. ungrab();
  2490. if (!drake.dragging) {
  2491. return;
  2492. }
  2493. var item = _copy || _item;
  2494. var clientX = getCoord('clientX', e);
  2495. var clientY = getCoord('clientY', e);
  2496. var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);
  2497. var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);
  2498. if (dropTarget && ((_copy && o.copySortSource) || (!_copy || dropTarget !== _source))) {
  2499. drop(item, dropTarget);
  2500. } else if (o.removeOnSpill) {
  2501. remove();
  2502. } else {
  2503. cancel();
  2504. }
  2505. }
  2506. function drop (item, target) {
  2507. var parent = getParent(item);
  2508. if (_copy && o.copySortSource && target === _source) {
  2509. parent.removeChild(_item);
  2510. }
  2511. if (isInitialPlacement(target)) {
  2512. drake.emit('cancel', item, _source, _source);
  2513. } else {
  2514. drake.emit('drop', item, target, _source, _currentSibling);
  2515. }
  2516. cleanup();
  2517. }
  2518. function remove () {
  2519. if (!drake.dragging) {
  2520. return;
  2521. }
  2522. var item = _copy || _item;
  2523. var parent = getParent(item);
  2524. if (parent) {
  2525. parent.removeChild(item);
  2526. }
  2527. drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source);
  2528. cleanup();
  2529. }
  2530. function cancel (revert) {
  2531. if (!drake.dragging) {
  2532. return;
  2533. }
  2534. var reverts = arguments.length > 0 ? revert : o.revertOnSpill;
  2535. var item = _copy || _item;
  2536. var parent = getParent(item);
  2537. var initial = isInitialPlacement(parent);
  2538. if (initial === false && reverts) {
  2539. if (_copy) {
  2540. if (parent) {
  2541. parent.removeChild(_copy);
  2542. }
  2543. } else {
  2544. _source.insertBefore(item, _initialSibling);
  2545. }
  2546. }
  2547. if (initial || reverts) {
  2548. drake.emit('cancel', item, _source, _source);
  2549. } else {
  2550. drake.emit('drop', item, parent, _source, _currentSibling);
  2551. }
  2552. cleanup();
  2553. }
  2554. function cleanup () {
  2555. var item = _copy || _item;
  2556. ungrab();
  2557. removeMirrorImage();
  2558. if (item) {
  2559. classes.rm(item, 'gu-transit');
  2560. }
  2561. if (_renderTimer) {
  2562. clearTimeout(_renderTimer);
  2563. }
  2564. drake.dragging = false;
  2565. if (_lastDropTarget) {
  2566. drake.emit('out', item, _lastDropTarget, _source);
  2567. }
  2568. drake.emit('dragend', item);
  2569. _source = _item = _copy = _initialSibling = _currentSibling = _renderTimer = _lastDropTarget = null;
  2570. }
  2571. function isInitialPlacement (target, s) {
  2572. var sibling;
  2573. if (s !== void 0) {
  2574. sibling = s;
  2575. } else if (_mirror) {
  2576. sibling = _currentSibling;
  2577. } else {
  2578. sibling = nextEl(_copy || _item);
  2579. }
  2580. return target === _source && sibling === _initialSibling;
  2581. }
  2582. function findDropTarget (elementBehindCursor, clientX, clientY) {
  2583. var target = elementBehindCursor;
  2584. while (target && !accepted()) {
  2585. target = getParent(target);
  2586. }
  2587. return target;
  2588. function accepted () {
  2589. var droppable = isContainer(target);
  2590. if (droppable === false) {
  2591. return false;
  2592. }
  2593. var immediate = getImmediateChild(target, elementBehindCursor);
  2594. var reference = getReference(target, immediate, clientX, clientY);
  2595. var initial = isInitialPlacement(target, reference);
  2596. if (initial) {
  2597. return true; // should always be able to drop it right back where it was
  2598. }
  2599. return o.accepts(_item, target, _source, reference);
  2600. }
  2601. }
  2602. function drag (e) {
  2603. if (!_mirror) {
  2604. return;
  2605. }
  2606. e.preventDefault();
  2607. var clientX = getCoord('clientX', e);
  2608. var clientY = getCoord('clientY', e);
  2609. var x = clientX - _offsetX;
  2610. var y = clientY - _offsetY;
  2611. _mirror.style.left = x + 'px';
  2612. _mirror.style.top = y + 'px';
  2613. var item = _copy || _item;
  2614. var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);
  2615. var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);
  2616. var changed = dropTarget !== null && dropTarget !== _lastDropTarget;
  2617. if (changed || dropTarget === null) {
  2618. out();
  2619. _lastDropTarget = dropTarget;
  2620. over();
  2621. }
  2622. var parent = getParent(item);
  2623. if (dropTarget === _source && _copy && !o.copySortSource) {
  2624. if (parent) {
  2625. parent.removeChild(item);
  2626. }
  2627. return;
  2628. }
  2629. var reference;
  2630. // var mover, moverRect;
  2631. // var previous, next, previousRect, nextRect, itemRect;
  2632. // var currentPrevious, currentNext;
  2633. var immediate = getImmediateChild(dropTarget, elementBehindCursor);
  2634. if (immediate !== null) {
  2635. reference = getReference(dropTarget, immediate, clientX, clientY);
  2636. } else if (o.revertOnSpill === true && !_copy) {
  2637. reference = _initialSibling;
  2638. dropTarget = _source;
  2639. } else {
  2640. if (_copy && parent) {
  2641. parent.removeChild(item);
  2642. }
  2643. return;
  2644. }
  2645. if (
  2646. (reference === null && changed) ||
  2647. reference !== item &&
  2648. reference !== nextEl(item)
  2649. ) {
  2650. _currentSibling = reference;
  2651. var isBrother = item.parentElement === dropTarget;
  2652. var shouldAnimate = isBrother && o.animation;
  2653. var itemRect = item.getBoundingClientRect();
  2654. var direct = o.direction;
  2655. var mover;
  2656. var nowCord = direct === 'horizontal' ? e.pageX : e.pageY;
  2657. if (nowCord < oldCoord) {
  2658. mover = reference; //upward or right
  2659. } else {
  2660. mover = reference ? (reference.previousElementSibling ? reference.previousElementSibling : reference) : dropTarget.lastElementChild;
  2661. }
  2662. oldCoord = nowCord;
  2663. if (!mover) {
  2664. return;
  2665. }
  2666. if (o.staticClass && mover.classList.contains(o.staticClass)) {
  2667. return;
  2668. }
  2669. var moverRect = mover && mover.getBoundingClientRect();
  2670. dropTarget.insertBefore(item, reference);
  2671. if (shouldAnimate && mover && moverRect) {
  2672. animate(moverRect, mover, o.animation);
  2673. animate(itemRect, item, o.animation);
  2674. }
  2675. drake.emit('shadow', item, dropTarget, _source);
  2676. }
  2677. function moved (type) {
  2678. drake.emit(type, item, _lastDropTarget, _source);
  2679. }
  2680. function over () {
  2681. if (changed) {
  2682. moved('over');
  2683. }
  2684. }
  2685. function out () {
  2686. if (_lastDropTarget) {
  2687. moved('out');
  2688. }
  2689. }
  2690. }
  2691. function spillOver (el) {
  2692. classes.rm(el, 'gu-hide');
  2693. }
  2694. function spillOut (el) {
  2695. if (drake.dragging) {
  2696. classes.add(el, 'gu-hide');
  2697. }
  2698. }
  2699. function renderMirrorImage () {
  2700. if (_mirror) {
  2701. return;
  2702. }
  2703. var rect = _item.getBoundingClientRect();
  2704. _mirror = _item.cloneNode(true);
  2705. _mirror.style.width = getRectWidth(rect) + 'px';
  2706. _mirror.style.height = getRectHeight(rect) + 'px';
  2707. classes.rm(_mirror, 'gu-transit');
  2708. classes.add(_mirror, 'gu-mirror');
  2709. o.mirrorContainer.appendChild(_mirror);
  2710. touchy(documentElement, 'add', 'mousemove', drag);
  2711. classes.add(o.mirrorContainer, 'gu-unselectable');
  2712. drake.emit('cloned', _mirror, _item, 'mirror');
  2713. }
  2714. function removeMirrorImage () {
  2715. if (_mirror) {
  2716. classes.rm(o.mirrorContainer, 'gu-unselectable');
  2717. touchy(documentElement, 'remove', 'mousemove', drag);
  2718. getParent(_mirror).removeChild(_mirror);
  2719. _mirror = null;
  2720. }
  2721. }
  2722. function getImmediateChild (dropTarget, target) {
  2723. var immediate = target;
  2724. while (immediate !== dropTarget && getParent(immediate) !== dropTarget) {
  2725. immediate = getParent(immediate);
  2726. }
  2727. if (immediate === documentElement) {
  2728. return null;
  2729. }
  2730. return immediate;
  2731. }
  2732. function getReference (dropTarget, target, x, y) {
  2733. var horizontal = o.direction === 'horizontal';
  2734. var reference = target !== dropTarget ? inside() : outside();
  2735. return reference;
  2736. function outside () { // slower, but able to figure out any position
  2737. var len = dropTarget.children.length;
  2738. var i;
  2739. var el;
  2740. var rect;
  2741. for (i = 0; i < len; i++) {
  2742. el = dropTarget.children[i];
  2743. rect = el.getBoundingClientRect();
  2744. if (horizontal && (rect.left + rect.width / 2) > x) {
  2745. return el;
  2746. }
  2747. if (!horizontal && (rect.top + rect.height / 2) > y) {
  2748. return el;
  2749. }
  2750. }
  2751. return null;
  2752. }
  2753. function inside () { // faster, but only available if dropped inside a child element
  2754. var rect = target.getBoundingClientRect();
  2755. if (horizontal) {
  2756. return resolve(x > rect.left + getRectWidth(rect) / 2);
  2757. }
  2758. return resolve(y > rect.top + getRectHeight(rect) / 2);
  2759. }
  2760. function resolve (after) {
  2761. return after ? nextEl(target) : target;
  2762. }
  2763. }
  2764. function isCopy (item, container) {
  2765. return typeof o.copy === 'boolean' ? o.copy : o.copy(item, container);
  2766. }
  2767. }
  2768. function touchy (el, op, type, fn) {
  2769. var touch = {
  2770. mouseup: 'touchend',
  2771. mousedown: 'touchstart',
  2772. mousemove: 'touchmove'
  2773. };
  2774. var pointers = {
  2775. mouseup: 'pointerup',
  2776. mousedown: 'pointerdown',
  2777. mousemove: 'pointermove'
  2778. };
  2779. var microsoft = {
  2780. mouseup: 'MSPointerUp',
  2781. mousedown: 'MSPointerDown',
  2782. mousemove: 'MSPointerMove'
  2783. };
  2784. if (global.navigator.pointerEnabled) {
  2785. crossvent[op](el, pointers[type], fn);
  2786. } else if (global.navigator.msPointerEnabled) {
  2787. crossvent[op](el, microsoft[type], fn);
  2788. } else {
  2789. crossvent[op](el, touch[type], fn);
  2790. crossvent[op](el, type, fn);
  2791. }
  2792. }
  2793. function whichMouseButton (e) {
  2794. if (e.touches !== void 0) {
  2795. return e.touches.length;
  2796. }
  2797. if (e.which !== void 0 && e.which !== 0) {
  2798. return e.which;
  2799. } // see https://github.com/bevacqua/dragula/issues/261
  2800. if (e.buttons !== void 0) {
  2801. return e.buttons;
  2802. }
  2803. var button = e.button;
  2804. if (button !== void 0) { // see https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575
  2805. return button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);
  2806. }
  2807. }
  2808. function getOffset (el) {
  2809. var rect = el.getBoundingClientRect();
  2810. return {
  2811. left: rect.left + getScroll('scrollLeft', 'pageXOffset'),
  2812. top: rect.top + getScroll('scrollTop', 'pageYOffset')
  2813. };
  2814. }
  2815. function getScroll (scrollProp, offsetProp) {
  2816. if (typeof global[offsetProp] !== 'undefined') {
  2817. return global[offsetProp];
  2818. }
  2819. if (documentElement.clientHeight) {
  2820. return documentElement[scrollProp];
  2821. }
  2822. return doc.body[scrollProp];
  2823. }
  2824. function getElementBehindPoint (point, x, y) {
  2825. var p = point || {};
  2826. var state = p.className;
  2827. var el;
  2828. p.className += ' gu-hide';
  2829. el = doc.elementFromPoint(x, y);
  2830. p.className = state;
  2831. return el;
  2832. }
  2833. function never () {
  2834. return false;
  2835. }
  2836. function always () {
  2837. return true;
  2838. }
  2839. function getRectWidth (rect) {
  2840. return rect.width || (rect.right - rect.left);
  2841. }
  2842. function getRectHeight (rect) {
  2843. return rect.height || (rect.bottom - rect.top);
  2844. }
  2845. function getParent (el) {
  2846. return el.parentNode === doc ? null : el.parentNode;
  2847. }
  2848. function isInput (el) {
  2849. return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el);
  2850. }
  2851. function isEditable (el) {
  2852. if (!el) {
  2853. return false;
  2854. } // no parents were editable
  2855. if (el.contentEditable === 'false') {
  2856. return false;
  2857. } // stop the lookup
  2858. if (el.contentEditable === 'true') {
  2859. return true;
  2860. } // found a contentEditable element in the chain
  2861. return isEditable(getParent(el)); // contentEditable is set to 'inherit'
  2862. }
  2863. function nextEl (el) {
  2864. return el.nextElementSibling || manually();
  2865. function manually () {
  2866. var sibling = el;
  2867. do {
  2868. sibling = sibling.nextSibling;
  2869. } while (sibling && sibling.nodeType !== 1);
  2870. return sibling;
  2871. }
  2872. }
  2873. // function previousEl (el) {
  2874. // return el.previousElementSibling || manually();
  2875. // function manually () {
  2876. // var sibling = el;
  2877. // do {
  2878. // sibling = sibling.previousSibling;
  2879. // } while (sibling && sibling.nodeType !== 1);
  2880. // return sibling;
  2881. // }
  2882. // }
  2883. function animate (prevRect, target, time) {
  2884. if (time) {
  2885. if (!prevRect || !target) {
  2886. return;
  2887. }
  2888. var currentRect = target.getBoundingClientRect();
  2889. target.style.transition = 'none';
  2890. target.style.transform = 'translate3d(' + (prevRect.left - currentRect.left) + 'px,' + (prevRect.top - currentRect.top) + 'px,0)';
  2891. target.offsetWidth; // repaint
  2892. target.style.transition = 'all ' + time + 'ms';
  2893. target.style.transform = 'translate3d(0,0,0)';
  2894. clearTimeout(target.animated);
  2895. target.animated = setTimeout(function () {
  2896. target.style.transition = '';
  2897. target.style.transform = '';
  2898. target.animated = false;
  2899. }, time);
  2900. }
  2901. }
  2902. function getEventHost (e) {
  2903. // on touchend event, we have to use `e.changedTouches`
  2904. // see http://stackoverflow.com/questions/7192563/touchend-event-properties
  2905. // see https://github.com/bevacqua/dragula/issues/34
  2906. if (e.targetTouches && e.targetTouches.length) {
  2907. return e.targetTouches[0];
  2908. }
  2909. if (e.changedTouches && e.changedTouches.length) {
  2910. return e.changedTouches[0];
  2911. }
  2912. return e;
  2913. }
  2914. function getCoord (coord, e) {
  2915. var host = getEventHost(e);
  2916. var missMap = {
  2917. pageX: 'clientX', // IE8
  2918. pageY: 'clientY' // IE8
  2919. };
  2920. if (coord in missMap && !(coord in host) && missMap[coord] in host) {
  2921. coord = missMap[coord];
  2922. }
  2923. return host[coord];
  2924. }
  2925. module.exports = dragula;
  2926. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
  2927. /***/ },
  2928. /* 97 */
  2929. /***/ function(module, exports, __webpack_require__) {
  2930. 'use strict';
  2931. var atoa = __webpack_require__(98);
  2932. var debounce = __webpack_require__(99);
  2933. module.exports = function emitter (thing, options) {
  2934. var opts = options || {};
  2935. var evt = {};
  2936. if (thing === undefined) { thing = {}; }
  2937. thing.on = function (type, fn) {
  2938. if (!evt[type]) {
  2939. evt[type] = [fn];
  2940. } else {
  2941. evt[type].push(fn);
  2942. }
  2943. return thing;
  2944. };
  2945. thing.once = function (type, fn) {
  2946. fn._once = true; // thing.off(fn) still works!
  2947. thing.on(type, fn);
  2948. return thing;
  2949. };
  2950. thing.off = function (type, fn) {
  2951. var c = arguments.length;
  2952. if (c === 1) {
  2953. delete evt[type];
  2954. } else if (c === 0) {
  2955. evt = {};
  2956. } else {
  2957. var et = evt[type];
  2958. if (!et) { return thing; }
  2959. et.splice(et.indexOf(fn), 1);
  2960. }
  2961. return thing;
  2962. };
  2963. thing.emit = function () {
  2964. var args = atoa(arguments);
  2965. return thing.emitterSnapshot(args.shift()).apply(this, args);
  2966. };
  2967. thing.emitterSnapshot = function (type) {
  2968. var et = (evt[type] || []).slice(0);
  2969. return function () {
  2970. var args = atoa(arguments);
  2971. var ctx = this || thing;
  2972. if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
  2973. et.forEach(function emitter (listen) {
  2974. if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
  2975. if (listen._once) { thing.off(type, listen); }
  2976. });
  2977. return thing;
  2978. };
  2979. };
  2980. return thing;
  2981. };
  2982. /***/ },
  2983. /* 98 */
  2984. /***/ function(module, exports) {
  2985. module.exports = function atoa (a, n) { return Array.prototype.slice.call(a, n); }
  2986. /***/ },
  2987. /* 99 */
  2988. /***/ function(module, exports, __webpack_require__) {
  2989. 'use strict';
  2990. var ticky = __webpack_require__(100);
  2991. module.exports = function debounce (fn, args, ctx) {
  2992. if (!fn) { return; }
  2993. ticky(function run () {
  2994. fn.apply(ctx || null, args || []);
  2995. });
  2996. };
  2997. /***/ },
  2998. /* 100 */
  2999. /***/ function(module, exports, __webpack_require__) {
  3000. /* WEBPACK VAR INJECTION */(function(setImmediate) {var si = typeof setImmediate === 'function', tick;
  3001. if (si) {
  3002. tick = function (fn) { setImmediate(fn); };
  3003. } else {
  3004. tick = function (fn) { setTimeout(fn, 0); };
  3005. }
  3006. module.exports = tick;
  3007. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(101).setImmediate))
  3008. /***/ },
  3009. /* 101 */
  3010. /***/ function(module, exports, __webpack_require__) {
  3011. var apply = Function.prototype.apply;
  3012. // DOM APIs, for completeness
  3013. exports.setTimeout = function() {
  3014. return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
  3015. };
  3016. exports.setInterval = function() {
  3017. return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
  3018. };
  3019. exports.clearTimeout =
  3020. exports.clearInterval = function(timeout) {
  3021. if (timeout) {
  3022. timeout.close();
  3023. }
  3024. };
  3025. function Timeout(id, clearFn) {
  3026. this._id = id;
  3027. this._clearFn = clearFn;
  3028. }
  3029. Timeout.prototype.unref = Timeout.prototype.ref = function() {};
  3030. Timeout.prototype.close = function() {
  3031. this._clearFn.call(window, this._id);
  3032. };
  3033. // Does not start the time, just sets up the members needed.
  3034. exports.enroll = function(item, msecs) {
  3035. clearTimeout(item._idleTimeoutId);
  3036. item._idleTimeout = msecs;
  3037. };
  3038. exports.unenroll = function(item) {
  3039. clearTimeout(item._idleTimeoutId);
  3040. item._idleTimeout = -1;
  3041. };
  3042. exports._unrefActive = exports.active = function(item) {
  3043. clearTimeout(item._idleTimeoutId);
  3044. var msecs = item._idleTimeout;
  3045. if (msecs >= 0) {
  3046. item._idleTimeoutId = setTimeout(function onTimeout() {
  3047. if (item._onTimeout)
  3048. item._onTimeout();
  3049. }, msecs);
  3050. }
  3051. };
  3052. // setimmediate attaches itself to the global object
  3053. __webpack_require__(102);
  3054. exports.setImmediate = setImmediate;
  3055. exports.clearImmediate = clearImmediate;
  3056. /***/ },
  3057. /* 102 */
  3058. /***/ function(module, exports, __webpack_require__) {
  3059. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  3060. "use strict";
  3061. if (global.setImmediate) {
  3062. return;
  3063. }
  3064. var nextHandle = 1; // Spec says greater than zero
  3065. var tasksByHandle = {};
  3066. var currentlyRunningATask = false;
  3067. var doc = global.document;
  3068. var registerImmediate;
  3069. function setImmediate(callback) {
  3070. // Callback can either be a function or a string
  3071. if (typeof callback !== "function") {
  3072. callback = new Function("" + callback);
  3073. }
  3074. // Copy function arguments
  3075. var args = new Array(arguments.length - 1);
  3076. for (var i = 0; i < args.length; i++) {
  3077. args[i] = arguments[i + 1];
  3078. }
  3079. // Store and register the task
  3080. var task = { callback: callback, args: args };
  3081. tasksByHandle[nextHandle] = task;
  3082. registerImmediate(nextHandle);
  3083. return nextHandle++;
  3084. }
  3085. function clearImmediate(handle) {
  3086. delete tasksByHandle[handle];
  3087. }
  3088. function run(task) {
  3089. var callback = task.callback;
  3090. var args = task.args;
  3091. switch (args.length) {
  3092. case 0:
  3093. callback();
  3094. break;
  3095. case 1:
  3096. callback(args[0]);
  3097. break;
  3098. case 2:
  3099. callback(args[0], args[1]);
  3100. break;
  3101. case 3:
  3102. callback(args[0], args[1], args[2]);
  3103. break;
  3104. default:
  3105. callback.apply(undefined, args);
  3106. break;
  3107. }
  3108. }
  3109. function runIfPresent(handle) {
  3110. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  3111. // So if we're currently running a task, we'll need to delay this invocation.
  3112. if (currentlyRunningATask) {
  3113. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  3114. // "too much recursion" error.
  3115. setTimeout(runIfPresent, 0, handle);
  3116. } else {
  3117. var task = tasksByHandle[handle];
  3118. if (task) {
  3119. currentlyRunningATask = true;
  3120. try {
  3121. run(task);
  3122. } finally {
  3123. clearImmediate(handle);
  3124. currentlyRunningATask = false;
  3125. }
  3126. }
  3127. }
  3128. }
  3129. function installNextTickImplementation() {
  3130. registerImmediate = function(handle) {
  3131. process.nextTick(function () { runIfPresent(handle); });
  3132. };
  3133. }
  3134. function canUsePostMessage() {
  3135. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  3136. // where `global.postMessage` means something completely different and can't be used for this purpose.
  3137. if (global.postMessage && !global.importScripts) {
  3138. var postMessageIsAsynchronous = true;
  3139. var oldOnMessage = global.onmessage;
  3140. global.onmessage = function() {
  3141. postMessageIsAsynchronous = false;
  3142. };
  3143. global.postMessage("", "*");
  3144. global.onmessage = oldOnMessage;
  3145. return postMessageIsAsynchronous;
  3146. }
  3147. }
  3148. function installPostMessageImplementation() {
  3149. // Installs an event handler on `global` for the `message` event: see
  3150. // * https://developer.mozilla.org/en/DOM/window.postMessage
  3151. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  3152. var messagePrefix = "setImmediate$" + Math.random() + "$";
  3153. var onGlobalMessage = function(event) {
  3154. if (event.source === global &&
  3155. typeof event.data === "string" &&
  3156. event.data.indexOf(messagePrefix) === 0) {
  3157. runIfPresent(+event.data.slice(messagePrefix.length));
  3158. }
  3159. };
  3160. if (global.addEventListener) {
  3161. global.addEventListener("message", onGlobalMessage, false);
  3162. } else {
  3163. global.attachEvent("onmessage", onGlobalMessage);
  3164. }
  3165. registerImmediate = function(handle) {
  3166. global.postMessage(messagePrefix + handle, "*");
  3167. };
  3168. }
  3169. function installMessageChannelImplementation() {
  3170. var channel = new MessageChannel();
  3171. channel.port1.onmessage = function(event) {
  3172. var handle = event.data;
  3173. runIfPresent(handle);
  3174. };
  3175. registerImmediate = function(handle) {
  3176. channel.port2.postMessage(handle);
  3177. };
  3178. }
  3179. function installReadyStateChangeImplementation() {
  3180. var html = doc.documentElement;
  3181. registerImmediate = function(handle) {
  3182. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  3183. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  3184. var script = doc.createElement("script");
  3185. script.onreadystatechange = function () {
  3186. runIfPresent(handle);
  3187. script.onreadystatechange = null;
  3188. html.removeChild(script);
  3189. script = null;
  3190. };
  3191. html.appendChild(script);
  3192. };
  3193. }
  3194. function installSetTimeoutImplementation() {
  3195. registerImmediate = function(handle) {
  3196. setTimeout(runIfPresent, 0, handle);
  3197. };
  3198. }
  3199. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  3200. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  3201. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  3202. // Don't get fooled by e.g. browserify environments.
  3203. if ({}.toString.call(global.process) === "[object process]") {
  3204. // For Node.js before 0.9
  3205. installNextTickImplementation();
  3206. } else if (canUsePostMessage()) {
  3207. // For non-IE10 modern browsers
  3208. installPostMessageImplementation();
  3209. } else if (global.MessageChannel) {
  3210. // For web workers, where supported
  3211. installMessageChannelImplementation();
  3212. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  3213. // For IE 6–8
  3214. installReadyStateChangeImplementation();
  3215. } else {
  3216. // For older browsers
  3217. installSetTimeoutImplementation();
  3218. }
  3219. attachTo.setImmediate = setImmediate;
  3220. attachTo.clearImmediate = clearImmediate;
  3221. }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
  3222. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(103)))
  3223. /***/ },
  3224. /* 103 */
  3225. /***/ function(module, exports) {
  3226. // shim for using process in browser
  3227. var process = module.exports = {};
  3228. // cached from whatever global is present so that test runners that stub it
  3229. // don't break things. But we need to wrap it in a try catch in case it is
  3230. // wrapped in strict mode code which doesn't define any globals. It's inside a
  3231. // function because try/catches deoptimize in certain engines.
  3232. var cachedSetTimeout;
  3233. var cachedClearTimeout;
  3234. function defaultSetTimout() {
  3235. throw new Error('setTimeout has not been defined');
  3236. }
  3237. function defaultClearTimeout () {
  3238. throw new Error('clearTimeout has not been defined');
  3239. }
  3240. (function () {
  3241. try {
  3242. if (typeof setTimeout === 'function') {
  3243. cachedSetTimeout = setTimeout;
  3244. } else {
  3245. cachedSetTimeout = defaultSetTimout;
  3246. }
  3247. } catch (e) {
  3248. cachedSetTimeout = defaultSetTimout;
  3249. }
  3250. try {
  3251. if (typeof clearTimeout === 'function') {
  3252. cachedClearTimeout = clearTimeout;
  3253. } else {
  3254. cachedClearTimeout = defaultClearTimeout;
  3255. }
  3256. } catch (e) {
  3257. cachedClearTimeout = defaultClearTimeout;
  3258. }
  3259. } ())
  3260. function runTimeout(fun) {
  3261. if (cachedSetTimeout === setTimeout) {
  3262. //normal enviroments in sane situations
  3263. return setTimeout(fun, 0);
  3264. }
  3265. // if setTimeout wasn't available but was latter defined
  3266. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  3267. cachedSetTimeout = setTimeout;
  3268. return setTimeout(fun, 0);
  3269. }
  3270. try {
  3271. // when when somebody has screwed with setTimeout but no I.E. maddness
  3272. return cachedSetTimeout(fun, 0);
  3273. } catch(e){
  3274. try {
  3275. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  3276. return cachedSetTimeout.call(null, fun, 0);
  3277. } catch(e){
  3278. // 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
  3279. return cachedSetTimeout.call(this, fun, 0);
  3280. }
  3281. }
  3282. }
  3283. function runClearTimeout(marker) {
  3284. if (cachedClearTimeout === clearTimeout) {
  3285. //normal enviroments in sane situations
  3286. return clearTimeout(marker);
  3287. }
  3288. // if clearTimeout wasn't available but was latter defined
  3289. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  3290. cachedClearTimeout = clearTimeout;
  3291. return clearTimeout(marker);
  3292. }
  3293. try {
  3294. // when when somebody has screwed with setTimeout but no I.E. maddness
  3295. return cachedClearTimeout(marker);
  3296. } catch (e){
  3297. try {
  3298. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  3299. return cachedClearTimeout.call(null, marker);
  3300. } catch (e){
  3301. // 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.
  3302. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  3303. return cachedClearTimeout.call(this, marker);
  3304. }
  3305. }
  3306. }
  3307. var queue = [];
  3308. var draining = false;
  3309. var currentQueue;
  3310. var queueIndex = -1;
  3311. function cleanUpNextTick() {
  3312. if (!draining || !currentQueue) {
  3313. return;
  3314. }
  3315. draining = false;
  3316. if (currentQueue.length) {
  3317. queue = currentQueue.concat(queue);
  3318. } else {
  3319. queueIndex = -1;
  3320. }
  3321. if (queue.length) {
  3322. drainQueue();
  3323. }
  3324. }
  3325. function drainQueue() {
  3326. if (draining) {
  3327. return;
  3328. }
  3329. var timeout = runTimeout(cleanUpNextTick);
  3330. draining = true;
  3331. var len = queue.length;
  3332. while(len) {
  3333. currentQueue = queue;
  3334. queue = [];
  3335. while (++queueIndex < len) {
  3336. if (currentQueue) {
  3337. currentQueue[queueIndex].run();
  3338. }
  3339. }
  3340. queueIndex = -1;
  3341. len = queue.length;
  3342. }
  3343. currentQueue = null;
  3344. draining = false;
  3345. runClearTimeout(timeout);
  3346. }
  3347. process.nextTick = function (fun) {
  3348. var args = new Array(arguments.length - 1);
  3349. if (arguments.length > 1) {
  3350. for (var i = 1; i < arguments.length; i++) {
  3351. args[i - 1] = arguments[i];
  3352. }
  3353. }
  3354. queue.push(new Item(fun, args));
  3355. if (queue.length === 1 && !draining) {
  3356. runTimeout(drainQueue);
  3357. }
  3358. };
  3359. // v8 likes predictible objects
  3360. function Item(fun, array) {
  3361. this.fun = fun;
  3362. this.array = array;
  3363. }
  3364. Item.prototype.run = function () {
  3365. this.fun.apply(null, this.array);
  3366. };
  3367. process.title = 'browser';
  3368. process.browser = true;
  3369. process.env = {};
  3370. process.argv = [];
  3371. process.version = ''; // empty string to avoid regexp issues
  3372. process.versions = {};
  3373. function noop() {}
  3374. process.on = noop;
  3375. process.addListener = noop;
  3376. process.once = noop;
  3377. process.off = noop;
  3378. process.removeListener = noop;
  3379. process.removeAllListeners = noop;
  3380. process.emit = noop;
  3381. process.binding = function (name) {
  3382. throw new Error('process.binding is not supported');
  3383. };
  3384. process.cwd = function () { return '/' };
  3385. process.chdir = function (dir) {
  3386. throw new Error('process.chdir is not supported');
  3387. };
  3388. process.umask = function() { return 0; };
  3389. /***/ },
  3390. /* 104 */
  3391. /***/ function(module, exports, __webpack_require__) {
  3392. /* WEBPACK VAR INJECTION */(function(global) {'use strict';
  3393. var customEvent = __webpack_require__(105);
  3394. var eventmap = __webpack_require__(106);
  3395. var doc = global.document;
  3396. var addEvent = addEventEasy;
  3397. var removeEvent = removeEventEasy;
  3398. var hardCache = [];
  3399. if (!global.addEventListener) {
  3400. addEvent = addEventHard;
  3401. removeEvent = removeEventHard;
  3402. }
  3403. module.exports = {
  3404. add: addEvent,
  3405. remove: removeEvent,
  3406. fabricate: fabricateEvent
  3407. };
  3408. function addEventEasy (el, type, fn, capturing) {
  3409. return el.addEventListener(type, fn, capturing);
  3410. }
  3411. function addEventHard (el, type, fn) {
  3412. return el.attachEvent('on' + type, wrap(el, type, fn));
  3413. }
  3414. function removeEventEasy (el, type, fn, capturing) {
  3415. return el.removeEventListener(type, fn, capturing);
  3416. }
  3417. function removeEventHard (el, type, fn) {
  3418. var listener = unwrap(el, type, fn);
  3419. if (listener) {
  3420. return el.detachEvent('on' + type, listener);
  3421. }
  3422. }
  3423. function fabricateEvent (el, type, model) {
  3424. var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();
  3425. if (el.dispatchEvent) {
  3426. el.dispatchEvent(e);
  3427. } else {
  3428. el.fireEvent('on' + type, e);
  3429. }
  3430. function makeClassicEvent () {
  3431. var e;
  3432. if (doc.createEvent) {
  3433. e = doc.createEvent('Event');
  3434. e.initEvent(type, true, true);
  3435. } else if (doc.createEventObject) {
  3436. e = doc.createEventObject();
  3437. }
  3438. return e;
  3439. }
  3440. function makeCustomEvent () {
  3441. return new customEvent(type, { detail: model });
  3442. }
  3443. }
  3444. function wrapperFactory (el, type, fn) {
  3445. return function wrapper (originalEvent) {
  3446. var e = originalEvent || global.event;
  3447. e.target = e.target || e.srcElement;
  3448. e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
  3449. e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
  3450. e.which = e.which || e.keyCode;
  3451. fn.call(el, e);
  3452. };
  3453. }
  3454. function wrap (el, type, fn) {
  3455. var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);
  3456. hardCache.push({
  3457. wrapper: wrapper,
  3458. element: el,
  3459. type: type,
  3460. fn: fn
  3461. });
  3462. return wrapper;
  3463. }
  3464. function unwrap (el, type, fn) {
  3465. var i = find(el, type, fn);
  3466. if (i) {
  3467. var wrapper = hardCache[i].wrapper;
  3468. hardCache.splice(i, 1); // free up a tad of memory
  3469. return wrapper;
  3470. }
  3471. }
  3472. function find (el, type, fn) {
  3473. var i, item;
  3474. for (i = 0; i < hardCache.length; i++) {
  3475. item = hardCache[i];
  3476. if (item.element === el && item.type === type && item.fn === fn) {
  3477. return i;
  3478. }
  3479. }
  3480. }
  3481. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
  3482. /***/ },
  3483. /* 105 */
  3484. /***/ function(module, exports) {
  3485. /* WEBPACK VAR INJECTION */(function(global) {
  3486. var NativeCustomEvent = global.CustomEvent;
  3487. function useNative () {
  3488. try {
  3489. var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
  3490. return 'cat' === p.type && 'bar' === p.detail.foo;
  3491. } catch (e) {
  3492. }
  3493. return false;
  3494. }
  3495. /**
  3496. * Cross-browser `CustomEvent` constructor.
  3497. *
  3498. * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
  3499. *
  3500. * @public
  3501. */
  3502. module.exports = useNative() ? NativeCustomEvent :
  3503. // IE >= 9
  3504. 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
  3505. var e = document.createEvent('CustomEvent');
  3506. if (params) {
  3507. e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
  3508. } else {
  3509. e.initCustomEvent(type, false, false, void 0);
  3510. }
  3511. return e;
  3512. } :
  3513. // IE <= 8
  3514. function CustomEvent (type, params) {
  3515. var e = document.createEventObject();
  3516. e.type = type;
  3517. if (params) {
  3518. e.bubbles = Boolean(params.bubbles);
  3519. e.cancelable = Boolean(params.cancelable);
  3520. e.detail = params.detail;
  3521. } else {
  3522. e.bubbles = false;
  3523. e.cancelable = false;
  3524. e.detail = void 0;
  3525. }
  3526. return e;
  3527. }
  3528. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
  3529. /***/ },
  3530. /* 106 */
  3531. /***/ function(module, exports) {
  3532. /* WEBPACK VAR INJECTION */(function(global) {'use strict';
  3533. var eventmap = [];
  3534. var eventname = '';
  3535. var ron = /^on/;
  3536. for (eventname in global) {
  3537. if (ron.test(eventname)) {
  3538. eventmap.push(eventname.slice(2));
  3539. }
  3540. }
  3541. module.exports = eventmap;
  3542. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
  3543. /***/ },
  3544. /* 107 */
  3545. /***/ function(module, exports) {
  3546. 'use strict';
  3547. var cache = {};
  3548. var start = '(?:^|\\s)';
  3549. var end = '(?:\\s|$)';
  3550. function lookupClass (className) {
  3551. var cached = cache[className];
  3552. if (cached) {
  3553. cached.lastIndex = 0;
  3554. } else {
  3555. cache[className] = cached = new RegExp(start + className + end, 'g');
  3556. }
  3557. return cached;
  3558. }
  3559. function addClass (el, className) {
  3560. var current = el.className;
  3561. if (!current.length) {
  3562. el.className = className;
  3563. } else if (!lookupClass(className).test(current)) {
  3564. el.className += ' ' + className;
  3565. }
  3566. }
  3567. function rmClass (el, className) {
  3568. el.className = el.className.replace(lookupClass(className), ' ').trim();
  3569. }
  3570. module.exports = {
  3571. add: addClass,
  3572. rm: rmClass
  3573. };
  3574. /***/ },
  3575. /* 108 */
  3576. /***/ function(module, exports) {
  3577. 'use strict';
  3578. Object.defineProperty(exports, "__esModule", {
  3579. value: true
  3580. });
  3581. exports.default = {
  3582. originTable: 'sindu_origin_table',
  3583. draggableTable: 'sindu_dragger',
  3584. dragging: 'sindu_dragging',
  3585. static: 'sindu_static',
  3586. handle: 'sindu_handle'
  3587. };
  3588. /***/ },
  3589. /* 109 */
  3590. /***/ function(module, exports, __webpack_require__) {
  3591. 'use strict';
  3592. Object.defineProperty(exports, "__esModule", {
  3593. value: true
  3594. });
  3595. exports.getScrollBarWidth = exports.sort = exports.insertBeforeSibling = exports.appendSibling = exports.remove = exports.on = exports.empty = exports.css = exports.getLongestRow = exports.touchy = exports.getTouchyEvent = undefined;
  3596. var _keys = __webpack_require__(110);
  3597. var _keys2 = _interopRequireDefault(_keys);
  3598. var _from = __webpack_require__(79);
  3599. var _from2 = _interopRequireDefault(_from);
  3600. var _crossvent = __webpack_require__(114);
  3601. var _crossvent2 = _interopRequireDefault(_crossvent);
  3602. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3603. var global = window;
  3604. var touch = {
  3605. mouseup: 'touchend',
  3606. mousedown: 'touchstart',
  3607. mousemove: 'touchmove'
  3608. };
  3609. var pointers = {
  3610. mouseup: 'pointerup',
  3611. mousedown: 'pointerdown',
  3612. mousemove: 'pointermove'
  3613. };
  3614. var getTouchyEvent = exports.getTouchyEvent = function getTouchyEvent() {
  3615. var event = void 0;
  3616. if (global.navigator.pointerEnabled) {
  3617. if (document.createEvent) {
  3618. event = document.createEvent("PointerEvent");
  3619. event.initMouseEvent("pointerdown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  3620. } else {
  3621. event = new PointerEvent('pointerdown', {
  3622. cancelable: true,
  3623. bubbles: true,
  3624. view: window
  3625. });
  3626. }
  3627. }
  3628. if (document.createEvent) {
  3629. event = document.createEvent("MouseEvent");
  3630. event.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  3631. } else {
  3632. event = new MouseEvent('mousedown', {
  3633. 'view': window,
  3634. 'bubbles': true,
  3635. 'cancelable': true
  3636. });
  3637. }
  3638. return event;
  3639. };
  3640. var touchy = exports.touchy = function touchy(el, op, type, fn) {
  3641. if (global.navigator.pointerEnabled) {
  3642. _crossvent2.default[op](el, pointers[type], fn);
  3643. } else {
  3644. _crossvent2.default[op](el, touch[type], fn);
  3645. _crossvent2.default[op](el, type, fn);
  3646. }
  3647. };
  3648. var getLongestRow = exports.getLongestRow = function getLongestRow(table) {
  3649. var result = table.rows[0];
  3650. (0, _from2.default)(table.rows).forEach(function (row) {
  3651. var rowL = row.children.length;
  3652. var resultL = result.children.length;
  3653. result = rowL > resultL ? row : result;
  3654. });
  3655. return result;
  3656. };
  3657. var css = exports.css = function css(el, csses) {
  3658. (0, _keys2.default)(csses).forEach(function (k) {
  3659. el.style[k] = csses[k];
  3660. });
  3661. return el;
  3662. };
  3663. var empty = exports.empty = function empty(node) {
  3664. while (node.firstElementChild) {
  3665. node.removeChild(node.firstElementChild);
  3666. }
  3667. };
  3668. var on = exports.on = function on(el, eventName, cb) {
  3669. el.addEventListener(eventName, cb);
  3670. };
  3671. var remove = exports.remove = function remove(el, eventName, cb) {
  3672. el.removeEventListener(eventName, cb);
  3673. };
  3674. var appendSibling = exports.appendSibling = function appendSibling(_ref) {
  3675. var target = _ref.target,
  3676. origin = _ref.origin,
  3677. parent = _ref.parent;
  3678. if (!target) {
  3679. return;
  3680. }
  3681. (parent || target.parentElement).insertBefore(target, origin ? origin.nextElementSibling : null);
  3682. };
  3683. var insertBeforeSibling = exports.insertBeforeSibling = function insertBeforeSibling(_ref2) {
  3684. var target = _ref2.target,
  3685. origin = _ref2.origin;
  3686. if (!target) {
  3687. return;
  3688. }
  3689. origin.parentElement.insertBefore(target, origin);
  3690. };
  3691. var sort = exports.sort = function sort(_ref3) {
  3692. var list = _ref3.list,
  3693. from = _ref3.from,
  3694. to = _ref3.to,
  3695. parent = _ref3.parent;
  3696. if (from < to) {
  3697. appendSibling({ target: list[from], origin: list[to], parent: parent });
  3698. } else {
  3699. insertBeforeSibling({ target: list[from], origin: list[to] });
  3700. }
  3701. };
  3702. var getScrollBarWidth = exports.getScrollBarWidth = function getScrollBarWidth() {
  3703. if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
  3704. return 0;
  3705. }
  3706. var inner = document.createElement('p');
  3707. inner.style.width = '100%';
  3708. inner.style.height = '200px';
  3709. var outer = document.createElement('div');
  3710. outer.style.position = 'absolute';
  3711. outer.style.top = '0px';
  3712. outer.style.left = '0px';
  3713. outer.style.visibility = 'hidden';
  3714. outer.style.width = '200px';
  3715. outer.style.height = '150px';
  3716. outer.style.overflow = 'hidden';
  3717. outer.appendChild(inner);
  3718. document.body.appendChild(outer);
  3719. var w1 = inner.offsetWidth;
  3720. outer.style.overflow = 'scroll';
  3721. var w2 = inner.offsetWidth;
  3722. if (w1 === w2) w2 = outer.clientWidth;
  3723. document.body.removeChild(outer);
  3724. return w1 - w2;
  3725. };
  3726. /***/ },
  3727. /* 110 */
  3728. /***/ function(module, exports, __webpack_require__) {
  3729. module.exports = { "default": __webpack_require__(111), __esModule: true };
  3730. /***/ },
  3731. /* 111 */
  3732. /***/ function(module, exports, __webpack_require__) {
  3733. __webpack_require__(112);
  3734. module.exports = __webpack_require__(17).Object.keys;
  3735. /***/ },
  3736. /* 112 */
  3737. /***/ function(module, exports, __webpack_require__) {
  3738. // 19.1.2.14 Object.keys(O)
  3739. var toObject = __webpack_require__(52)
  3740. , $keys = __webpack_require__(36);
  3741. __webpack_require__(113)('keys', function(){
  3742. return function keys(it){
  3743. return $keys(toObject(it));
  3744. };
  3745. });
  3746. /***/ },
  3747. /* 113 */
  3748. /***/ function(module, exports, __webpack_require__) {
  3749. // most Object methods by ES6 should accept primitives
  3750. var $export = __webpack_require__(15)
  3751. , core = __webpack_require__(17)
  3752. , fails = __webpack_require__(26);
  3753. module.exports = function(KEY, exec){
  3754. var fn = (core.Object || {})[KEY] || Object[KEY]
  3755. , exp = {};
  3756. exp[KEY] = exec(fn);
  3757. $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
  3758. };
  3759. /***/ },
  3760. /* 114 */
  3761. /***/ function(module, exports, __webpack_require__) {
  3762. /* WEBPACK VAR INJECTION */(function(global) {'use strict';
  3763. var customEvent = __webpack_require__(115);
  3764. var eventmap = __webpack_require__(116);
  3765. var doc = global.document;
  3766. var addEvent = addEventEasy;
  3767. var removeEvent = removeEventEasy;
  3768. var hardCache = [];
  3769. if (!global.addEventListener) {
  3770. addEvent = addEventHard;
  3771. removeEvent = removeEventHard;
  3772. }
  3773. module.exports = {
  3774. add: addEvent,
  3775. remove: removeEvent,
  3776. fabricate: fabricateEvent
  3777. };
  3778. function addEventEasy (el, type, fn, capturing) {
  3779. return el.addEventListener(type, fn, capturing);
  3780. }
  3781. function addEventHard (el, type, fn) {
  3782. return el.attachEvent('on' + type, wrap(el, type, fn));
  3783. }
  3784. function removeEventEasy (el, type, fn, capturing) {
  3785. return el.removeEventListener(type, fn, capturing);
  3786. }
  3787. function removeEventHard (el, type, fn) {
  3788. var listener = unwrap(el, type, fn);
  3789. if (listener) {
  3790. return el.detachEvent('on' + type, listener);
  3791. }
  3792. }
  3793. function fabricateEvent (el, type, model) {
  3794. var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();
  3795. if (el.dispatchEvent) {
  3796. el.dispatchEvent(e);
  3797. } else {
  3798. el.fireEvent('on' + type, e);
  3799. }
  3800. function makeClassicEvent () {
  3801. var e;
  3802. if (doc.createEvent) {
  3803. e = doc.createEvent('Event');
  3804. e.initEvent(type, true, true);
  3805. } else if (doc.createEventObject) {
  3806. e = doc.createEventObject();
  3807. }
  3808. return e;
  3809. }
  3810. function makeCustomEvent () {
  3811. return new customEvent(type, { detail: model });
  3812. }
  3813. }
  3814. function wrapperFactory (el, type, fn) {
  3815. return function wrapper (originalEvent) {
  3816. var e = originalEvent || global.event;
  3817. e.target = e.target || e.srcElement;
  3818. e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
  3819. e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
  3820. e.which = e.which || e.keyCode;
  3821. fn.call(el, e);
  3822. };
  3823. }
  3824. function wrap (el, type, fn) {
  3825. var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);
  3826. hardCache.push({
  3827. wrapper: wrapper,
  3828. element: el,
  3829. type: type,
  3830. fn: fn
  3831. });
  3832. return wrapper;
  3833. }
  3834. function unwrap (el, type, fn) {
  3835. var i = find(el, type, fn);
  3836. if (i) {
  3837. var wrapper = hardCache[i].wrapper;
  3838. hardCache.splice(i, 1); // free up a tad of memory
  3839. return wrapper;
  3840. }
  3841. }
  3842. function find (el, type, fn) {
  3843. var i, item;
  3844. for (i = 0; i < hardCache.length; i++) {
  3845. item = hardCache[i];
  3846. if (item.element === el && item.type === type && item.fn === fn) {
  3847. return i;
  3848. }
  3849. }
  3850. }
  3851. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
  3852. /***/ },
  3853. /* 115 */
  3854. /***/ function(module, exports) {
  3855. /* WEBPACK VAR INJECTION */(function(global) {
  3856. var NativeCustomEvent = global.CustomEvent;
  3857. function useNative () {
  3858. try {
  3859. var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
  3860. return 'cat' === p.type && 'bar' === p.detail.foo;
  3861. } catch (e) {
  3862. }
  3863. return false;
  3864. }
  3865. /**
  3866. * Cross-browser `CustomEvent` constructor.
  3867. *
  3868. * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
  3869. *
  3870. * @public
  3871. */
  3872. module.exports = useNative() ? NativeCustomEvent :
  3873. // IE >= 9
  3874. 'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
  3875. var e = document.createEvent('CustomEvent');
  3876. if (params) {
  3877. e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
  3878. } else {
  3879. e.initCustomEvent(type, false, false, void 0);
  3880. }
  3881. return e;
  3882. } :
  3883. // IE <= 8
  3884. function CustomEvent (type, params) {
  3885. var e = document.createEventObject();
  3886. e.type = type;
  3887. if (params) {
  3888. e.bubbles = Boolean(params.bubbles);
  3889. e.cancelable = Boolean(params.cancelable);
  3890. e.detail = params.detail;
  3891. } else {
  3892. e.bubbles = false;
  3893. e.cancelable = false;
  3894. e.detail = void 0;
  3895. }
  3896. return e;
  3897. }
  3898. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
  3899. /***/ },
  3900. /* 116 */
  3901. /***/ function(module, exports) {
  3902. /* WEBPACK VAR INJECTION */(function(global) {'use strict';
  3903. var eventmap = [];
  3904. var eventname = '';
  3905. var ron = /^on/;
  3906. for (eventname in global) {
  3907. if (ron.test(eventname)) {
  3908. eventmap.push(eventname.slice(2));
  3909. }
  3910. }
  3911. module.exports = eventmap;
  3912. /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
  3913. /***/ }
  3914. /******/ ])
  3915. });
  3916. ;
  3917. //# sourceMappingURL=table-dragger.js.map