table-dragger.js 134 KB

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