LearnPress – WordPress LMS Plugin - Version 4.1.7.3.1

Version Description

(2022-11-03) = ~ Fixed: error build missing styles.

Download this release

Release Info

Developer ThimPress
Plugin Icon 128x128 LearnPress – WordPress LMS Plugin
Version 4.1.7.3.1
Comparing to
See all releases

Code changes from version 4.1.7.3 to 4.1.7.3.1

Files changed (118) hide show
  1. assets/css/admin/admin-rtl.css +0 -3
  2. assets/css/admin/admin.css +0 -3
  3. assets/css/learnpress-rtl.css +0 -2
  4. assets/css/learnpress.css +0 -2
  5. assets/js/dist/admin/editor/course.asset.php +1 -0
  6. assets/js/dist/admin/editor/course.js.map +1 -0
  7. assets/js/dist/admin/editor/course.min.asset.php +1 -0
  8. assets/js/dist/admin/editor/question.asset.php +1 -0
  9. assets/js/dist/admin/editor/question.js.map +1 -0
  10. assets/js/dist/admin/editor/question.min.asset.php +1 -0
  11. assets/js/dist/admin/editor/quiz.asset.php +1 -0
  12. assets/js/dist/admin/editor/quiz.js.map +1 -0
  13. assets/js/dist/admin/editor/quiz.min.asset.php +1 -0
  14. assets/js/dist/admin/pages/dashboard.asset.php +1 -0
  15. assets/js/dist/admin/pages/dashboard.js.map +1 -0
  16. assets/js/dist/admin/pages/dashboard.min.asset.php +1 -0
  17. assets/js/dist/admin/pages/setup.asset.php +1 -0
  18. assets/js/dist/admin/pages/setup.js.map +1 -0
  19. assets/js/dist/admin/pages/setup.min.asset.php +1 -0
  20. assets/js/dist/admin/pages/statistic.asset.php +1 -0
  21. assets/js/dist/admin/pages/statistic.js.map +1 -0
  22. assets/js/dist/admin/pages/statistic.min.asset.php +1 -0
  23. assets/js/dist/admin/pages/sync-data.asset.php +1 -0
  24. assets/js/dist/admin/pages/sync-data.js.map +1 -0
  25. assets/js/dist/admin/pages/sync-data.min.asset.php +1 -0
  26. assets/js/dist/admin/pages/themes-addons.asset.php +1 -0
  27. assets/js/dist/admin/pages/themes-addons.js.map +1 -0
  28. assets/js/dist/admin/pages/themes-addons.min.asset.php +1 -0
  29. assets/js/dist/admin/pages/tools.asset.php +1 -0
  30. assets/js/dist/admin/pages/tools.js +5 -0
  31. assets/js/dist/admin/pages/tools.js.map +1 -0
  32. assets/js/dist/admin/pages/tools.min.asset.php +1 -0
  33. assets/js/dist/admin/pages/widgets.asset.php +1 -0
  34. assets/js/dist/admin/pages/widgets.js.map +1 -0
  35. assets/js/dist/admin/pages/widgets.min.asset.php +1 -0
  36. assets/js/dist/blocks/index.asset.php +1 -0
  37. assets/js/dist/blocks/index.deps.json +1 -0
  38. assets/js/dist/blocks/index.js +1 -1
  39. assets/js/dist/blocks/index.js.map +1 -0
  40. assets/js/dist/blocks/index.min.asset.php +1 -0
  41. assets/js/dist/blocks/index.min.deps.json +1 -0
  42. assets/js/dist/frontend/become-teacher.asset.php +1 -0
  43. assets/js/dist/frontend/become-teacher.js.map +1 -0
  44. assets/js/dist/frontend/become-teacher.min.asset.php +1 -0
  45. assets/js/dist/frontend/checkout.asset.php +1 -0
  46. assets/js/dist/frontend/checkout.js.map +1 -0
  47. assets/js/dist/frontend/checkout.min.asset.php +1 -0
  48. assets/js/dist/frontend/courses.asset.php +1 -0
  49. assets/js/dist/frontend/courses.deps.json +1 -0
  50. assets/js/dist/frontend/courses.js +5 -5
  51. assets/js/dist/frontend/courses.js.map +1 -0
  52. assets/js/dist/frontend/courses.min.asset.php +1 -0
  53. assets/js/dist/frontend/courses.min.deps.json +1 -0
  54. assets/js/dist/frontend/custom.asset.php +1 -0
  55. assets/js/dist/frontend/custom.deps.json +1 -0
  56. assets/js/dist/frontend/custom.js.map +1 -0
  57. assets/js/dist/frontend/custom.min.asset.php +1 -0
  58. assets/js/dist/frontend/custom.min.deps.json +1 -0
  59. assets/js/dist/frontend/lesson.asset.php +1 -0
  60. assets/js/dist/frontend/lesson.deps.json +1 -0
  61. assets/js/dist/frontend/lesson.js.map +1 -0
  62. assets/js/dist/frontend/lesson.min.asset.php +1 -0
  63. assets/js/dist/frontend/lesson.min.deps.json +1 -0
  64. assets/js/dist/frontend/lp-configs.asset.php +1 -0
  65. assets/js/dist/frontend/lp-configs.deps.json +1 -0
  66. assets/js/dist/frontend/lp-configs.js.map +1 -0
  67. assets/js/dist/frontend/lp-configs.min.asset.php +1 -0
  68. assets/js/dist/frontend/lp-configs.min.deps.json +1 -0
  69. assets/js/dist/frontend/modal.asset.php +1 -0
  70. assets/js/dist/frontend/modal.deps.json +1 -0
  71. assets/js/dist/frontend/modal.js.map +1 -0
  72. assets/js/dist/frontend/modal.min.asset.php +1 -0
  73. assets/js/dist/frontend/modal.min.deps.json +1 -0
  74. assets/js/dist/frontend/profile.asset.php +1 -0
  75. assets/js/dist/frontend/profile.deps.json +1 -0
  76. assets/js/dist/frontend/profile.js +2 -2
  77. assets/js/dist/frontend/profile.js.map +1 -0
  78. assets/js/dist/frontend/profile.min.asset.php +1 -0
  79. assets/js/dist/frontend/profile.min.deps.json +1 -0
  80. assets/js/dist/frontend/question-types.asset.php +1 -0
  81. assets/js/dist/frontend/question-types.deps.json +1 -0
  82. assets/js/dist/frontend/question-types.js +1 -1
  83. assets/js/dist/frontend/question-types.js.map +1 -0
  84. assets/js/dist/frontend/question-types.min.asset.php +1 -0
  85. assets/js/dist/frontend/question-types.min.deps.json +1 -0
  86. assets/js/dist/frontend/quiz.asset.php +1 -0
  87. assets/js/dist/frontend/quiz.deps.json +1 -0
  88. assets/js/dist/frontend/quiz.js +11 -16
  89. assets/js/dist/frontend/quiz.js.map +1 -0
  90. assets/js/dist/frontend/quiz.min.asset.php +1 -0
  91. assets/js/dist/frontend/quiz.min.deps.json +1 -0
  92. assets/js/dist/frontend/single-course.asset.php +1 -0
  93. assets/js/dist/frontend/single-course.deps.json +1 -0
  94. assets/js/dist/frontend/single-course.js +8 -2
  95. assets/js/dist/frontend/single-course.js.map +1 -0
  96. assets/js/dist/frontend/single-course.min.asset.php +1 -0
  97. assets/js/dist/frontend/single-course.min.deps.json +1 -0
  98. assets/js/dist/frontend/single-curriculum.asset.php +1 -0
  99. assets/js/dist/frontend/single-curriculum.deps.json +1 -0
  100. assets/js/dist/frontend/single-curriculum.js +8 -2
  101. assets/js/dist/frontend/single-curriculum.js.map +1 -0
  102. assets/js/dist/frontend/single-curriculum.min.asset.php +1 -0
  103. assets/js/dist/frontend/single-curriculum.min.deps.json +1 -0
  104. assets/js/dist/frontend/widgets.asset.php +1 -0
  105. assets/js/dist/frontend/widgets.deps.json +1 -0
  106. assets/js/dist/frontend/widgets.js.map +1 -0
  107. assets/js/dist/frontend/widgets.min.asset.php +1 -0
  108. assets/js/dist/frontend/widgets.min.deps.json +1 -0
  109. assets/js/dist/js/data-controls.asset.php +1 -0
  110. assets/js/dist/js/data-controls.deps.json +1 -0
  111. assets/js/dist/js/data-controls.js.map +1 -0
  112. assets/js/dist/js/data-controls.min.asset.php +1 -0
  113. assets/js/dist/js/data-controls.min.deps.json +1 -0
  114. assets/js/dist/utils.asset.php +1 -0
  115. assets/js/dist/utils.js.map +1 -0
  116. assets/js/dist/utils.min.asset.php +1 -0
  117. assets/js/vendor/plugins.all.js +359 -1
  118. assets/js/vendor/vue/vue_libs.js +0 -1
assets/css/admin/admin-rtl.css CHANGED
@@ -1172,7 +1172,6 @@ ul .clearfix {
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
1175
-
1176
  .wp-responsive-open .learn-press-advertisement-slider {
1177
  margin-right: 56px;
1178
  }
@@ -2567,7 +2566,6 @@ input[name=_lp_course_result]:checked ~ #passing-condition-quiz-result {
2567
  .plugin-card:not(.hide-if-js):nth-child(even) {
2568
  margin-left: 8px;
2569
  }
2570
-
2571
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2572
  margin-left: 0;
2573
  }
@@ -6071,7 +6069,6 @@ body.lp-item-moving {
6071
  .learn-press-dropdown-pages .select2-selection__rendered {
6072
  line-height: 31px !important;
6073
  }
6074
-
6075
  #learn-press-advertisement {
6076
  margin: 0 12px;
6077
  padding-bottom: 0;
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
 
1175
  .wp-responsive-open .learn-press-advertisement-slider {
1176
  margin-right: 56px;
1177
  }
2566
  .plugin-card:not(.hide-if-js):nth-child(even) {
2567
  margin-left: 8px;
2568
  }
 
2569
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2570
  margin-left: 0;
2571
  }
6069
  .learn-press-dropdown-pages .select2-selection__rendered {
6070
  line-height: 31px !important;
6071
  }
 
6072
  #learn-press-advertisement {
6073
  margin: 0 12px;
6074
  padding-bottom: 0;
assets/css/admin/admin.css CHANGED
@@ -1172,7 +1172,6 @@ ul .clearfix {
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
1175
-
1176
  .wp-responsive-open .learn-press-advertisement-slider {
1177
  margin-left: 56px;
1178
  }
@@ -2567,7 +2566,6 @@ input[name=_lp_course_result]:checked ~ #passing-condition-quiz-result {
2567
  .plugin-card:not(.hide-if-js):nth-child(even) {
2568
  margin-right: 8px;
2569
  }
2570
-
2571
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2572
  margin-right: 0;
2573
  }
@@ -6071,7 +6069,6 @@ body.lp-item-moving {
6071
  .learn-press-dropdown-pages .select2-selection__rendered {
6072
  line-height: 31px !important;
6073
  }
6074
-
6075
  #learn-press-advertisement {
6076
  margin: 0 12px;
6077
  padding-bottom: 0;
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
 
1175
  .wp-responsive-open .learn-press-advertisement-slider {
1176
  margin-left: 56px;
1177
  }
2566
  .plugin-card:not(.hide-if-js):nth-child(even) {
2567
  margin-right: 8px;
2568
  }
 
2569
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2570
  margin-right: 0;
2571
  }
6069
  .learn-press-dropdown-pages .select2-selection__rendered {
6070
  line-height: 31px !important;
6071
  }
 
6072
  #learn-press-advertisement {
6073
  margin: 0 12px;
6074
  padding-bottom: 0;
assets/css/learnpress-rtl.css CHANGED
@@ -3519,7 +3519,6 @@ input[name=course-faqs-box-ratio]:checked + .course-faqs-box .course-faqs-box__t
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
3522
-
3523
  .learn-press-course-results-progress {
3524
  margin-left: 0%;
3525
  }
@@ -6913,7 +6912,6 @@ body.lp-sidebar-toggle__close #popup-course #popup-header, body.lp-sidebar-toggl
6913
  body.admin-bar #popup-course {
6914
  top: 46px;
6915
  }
6916
-
6917
  #popup-course #popup-sidebar {
6918
  flex-basis: 250px;
6919
  }
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
 
3522
  .learn-press-course-results-progress {
3523
  margin-left: 0%;
3524
  }
6912
  body.admin-bar #popup-course {
6913
  top: 46px;
6914
  }
 
6915
  #popup-course #popup-sidebar {
6916
  flex-basis: 250px;
6917
  }
assets/css/learnpress.css CHANGED
@@ -3519,7 +3519,6 @@ input[name=course-faqs-box-ratio]:checked + .course-faqs-box .course-faqs-box__t
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
3522
-
3523
  .learn-press-course-results-progress {
3524
  margin-right: 0%;
3525
  }
@@ -6913,7 +6912,6 @@ body.lp-sidebar-toggle__close #popup-course #popup-header, body.lp-sidebar-toggl
6913
  body.admin-bar #popup-course {
6914
  top: 46px;
6915
  }
6916
-
6917
  #popup-course #popup-sidebar {
6918
  flex-basis: 250px;
6919
  }
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
 
3522
  .learn-press-course-results-progress {
3523
  margin-right: 0%;
3524
  }
6912
  body.admin-bar #popup-course {
6913
  top: 46px;
6914
  }
 
6915
  #popup-course #popup-sidebar {
6916
  flex-basis: 250px;
6917
  }
assets/js/dist/admin/editor/course.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'ef352d489fbb2adb96da');
assets/js/dist/admin/editor/course.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/editor/course.js","mappings":";;;;;;;;;;;AAAA,MAAMA,CAAC,GAAGC,MAAM,CAACC,MAAP,IAAiBA,MAA3B;AAEA,MAAMC,gBAAgB,GAAG;AACxBC,EAAAA,iBAAiB,CAAEC,OAAF,EAAY;AAC5B,UAAMC,MAAM,GAAGD,OAAO,CAACE,OAAR,CAAgBC,mBAA/B;;AAEA,QAAKF,MAAL,EAAc;AACbD,MAAAA,OAAO,CAACI,MAAR,CAAgB,mBAAhB;AACA,KAFD,MAEO;AACNJ,MAAAA,OAAO,CAACI,MAAR,CAAgB,oBAAhB;AACA;;AAEDC,IAAAA,EAAE,CAACC,OAAH,CAAY;AACXC,MAAAA,IAAI,EAAE,iBADK;AAEXN,MAAAA,MAAM,EAAED,OAAO,CAACE,OAAR,CAAgBM;AAFb,KAAZ;AAIA,GAduB;;AAgBxBC,EAAAA,mBAAmB,CAAET,OAAF,EAAWU,KAAX,EAAmB;AACrCL,IAAAA,EAAE,CAACC,OAAH,CAAY;AACXC,MAAAA,IAAI,EAAE,eADK;AAEXG,MAAAA,KAAK,EAAEC,IAAI,CAACC,SAAL,CAAgBF,KAAhB;AAFI,KAAZ,EAGIG,IAHJ,CAIC,UAAUC,QAAV,EAAqB;AACpB,YAAMC,MAAM,GAAGD,QAAQ,CAACE,IAAxB;AACA,YAAMC,cAAc,GAAGF,MAAM,CAACG,IAA9B;AAEAlB,MAAAA,OAAO,CAACI,MAAR,CAAgB,cAAhB,EAAgCa,cAAhC;AACA,KATF,EAUC,UAAUE,KAAV,EAAkB;AACjBC,MAAAA,OAAO,CAACD,KAAR,CAAeA,KAAf;AACA,KAZF;AAcA,GA/BuB;;AAiCxBE,EAAAA,aAAa,CAAErB,OAAF,EAAWsB,OAAX,EAAqB;AACjC,QAAKA,OAAO,CAACC,IAAb,EAAoB;AACnBvB,MAAAA,OAAO,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AAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;ACNA;AACA;AAEAtL,MAAM,CAACwI,IAAP,GAAcxI,MAAM,CAACwI,IAAP,IAAe1B,GAA7B;AACA9G,MAAM,CAAC+L,KAAP,GAAe/L,MAAM,CAAC+L,KAAP,IAAgBC,IAA/B;AAEA,MAAMjM,CAAC,GAAGC,MAAM,CAACC,MAAjB;AAEA;AACA;AACA;AACA;AACA;;AACAF,CAAC,CAAEkM,QAAF,CAAD,CAAcC,KAAd,CAAqB,YAAW;AAC/BlM,EAAAA,MAAM,CAACmM,mBAAP,GAA6B,IAAIJ,KAAK,CAACK,KAAV,CAAiBN,yDAAW,CAAEO,2BAAF,CAA5B,CAA7B;AACA1F,EAAAA,iDAAI,CAAE;AAAEK,IAAAA,EAAE,EAAE,qBAAN;AAA6BC,IAAAA,KAAK,EAAEkF;AAApC,GAAF,CAAJ;AAEAG,EAAAA,UAAU,CAAE,MAAM;AACjBtM,IAAAA,MAAM,CAACuM,gBAAP,GAA0B,IAAI/D,IAAJ,CAAU;AACnCgE,MAAAA,EAAE,EAAE,yBAD+B;AAEnCC,MAAAA,QAAQ,EAAE;AAFyB,KAAV,CAA1B;AAIA,GALS,EAKP,GALO,CAAV;AAMA,CAVD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/editor/actions/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/modal-course-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/modal-course-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/http.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/modal-course-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/i18n.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/modal-course-items.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/editor/course.js"],"sourcesContent":["const $ = window.jQuery || jQuery;\n\nconst CourseCurriculum = {\n\ttoggleAllSections( context ) {\n\t\tconst hidden = context.getters.isHiddenAllSections;\n\n\t\tif ( hidden ) {\n\t\t\tcontext.commit( 'OPEN_ALL_SECTIONS' );\n\t\t} else {\n\t\t\tcontext.commit( 'CLOSE_ALL_SECTIONS' );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-sections',\n\t\t\thidden: context.getters.hiddenSections,\n\t\t} );\n\t},\n\n\tupdateSectionsOrder( context, order ) {\n\t\tLP.Request( {\n\t\t\ttype: 'sort-sections',\n\t\t\torder: JSON.stringify( order ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t\tconst order_sections = result.data;\n\n\t\t\t\tcontext.commit( 'SORT_SECTION', order_sections );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\ttoggleSection( context, section ) {\n\t\tif ( section.open ) {\n\t\t\tcontext.commit( 'CLOSE_SECTION', section );\n\t\t} else {\n\t\t\tcontext.commit( 'OPEN_SECTION', section );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-sections',\n\t\t\thidden: context.getters.hiddenSections,\n\t\t} );\n\t},\n\n\tupdateSection( context, section ) {\n\t\tcontext.commit( 'UPDATE_SECTION_REQUEST', section.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-section',\n\t\t\tsection: JSON.stringify( section ),\n\t\t} ).then( function() {\n\t\t\tcontext.commit( 'UPDATE_SECTION_SUCCESS', section.id );\n\t\t} )\n\t\t\t.catch( function() {\n\t\t\t\tcontext.commit( 'UPDATE_SECTION_FAILURE', section.id );\n\t\t\t} );\n\t},\n\n\tremoveSection( context, payload ) {\n\t\tcontext.commit( 'REMOVE_SECTION', payload.index );\n\n\t\tLP.Request( {\n\t\t\ttype: 'remove-section',\n\t\t\tsection_id: payload.section.id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tnewSection( context, name ) {\n\t\tconst newSection = {\n\t\t\ttype: 'new-section',\n\t\t\tsection_name: name,\n\t\t\ttemp_id: LP.uniqueId(),\n\t\t};\n\t\tcontext.commit( 'ADD_NEW_SECTION', {\n\t\t\tid: newSection.temp_id,\n\t\t\titems: [],\n\t\t\topen: false,\n\t\t\ttitle: newSection.section_name,\n\t\t} );\n\n\t\tLP.Request( newSection ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tconst section = $.extend( {}, result.data, { open: true } );\n\t\t\t\t\tcontext.commit( 'ADD_NEW_SECTION', section );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateSectionItem( context, payload ) {\n\t\tcontext.commit( 'UPDATE_SECTION_ITEM_REQUEST', payload.item.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem: JSON.stringify( payload.item ),\n\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tcontext.commit( 'UPDATE_SECTION_ITEM_SUCCESS', payload.item.id );\n\n\t\t\t\tconst result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tconst item = result.data;\n\n\t\t\t\t\tcontext.commit( 'UPDATE_SECTION_ITEM', { section_id: payload.section_id, item } );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_SECTION_ITEM_FAILURE', payload.item.id );\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tremoveSectionItem( context, payload ) {\n\t\tconst id = payload.item.id;\n\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\tpayload.item.temp_id = 0;\n\t\tLP.Request( {\n\t\t\ttype: 'remove-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem_id: id,\n\t\t} ).then(\n\t\t\tfunction( rs ) {\n\t\t\t\tconst { data, success } = rs.body;\n\n\t\t\t\tif ( success ) {\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t} else {\n\t\t\t\t\talert( data );\n\t\t\t\t\tpayload.oldId = id;\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t}\n\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteSectionItem( context, payload ) {\n\t\tconst id = payload.item.id;\n\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\tpayload.item.temp_id = 0;\n\t\tLP.Request( {\n\t\t\ttype: 'delete-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem_id: id,\n\t\t} ).then(\n\t\t\tfunction( rs ) {\n\t\t\t\tconst { data, success } = rs.body;\n\n\t\t\t\tif ( success ) {\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t} else {\n\t\t\t\t\talert( data );\n\t\t\t\t\tpayload.oldId = id;\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\n\tnewSectionItem( context, payload ) {\n\t\tcontext.commit( 'APPEND_EMPTY_ITEM_TO_SECTION', payload );\n\t\t//context.commit('UPDATE_SECTION_ITEMS', {section_id: payload.section_id, items: result.data});\n\t\tLP.Request( {\n\t\t\ttype: 'new-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem: JSON.stringify( payload.item ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\t// context.commit('UPDATE_SECTION_ITEMS', {section_id: payload.section_id, items: result.data});\n\t\t\t\t\tconst items = {};\n\t\t\t\t\t$.each( result.data, function( i, a ) {\n\t\t\t\t\t\titems[ a.old_id ? a.old_id : a.id ] = a;\n\t\t\t\t\t} );\n\n\t\t\t\t\tcontext.commit( 'UPDATE_ITEM_SECTION_BY_ID', {\n\t\t\t\t\t\tsection_id: payload.section_id,\n\t\t\t\t\t\titems,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateSectionItems( { state }, payload ) {\n\t\tLP.Request( {\n\t\t\ttype: 'update-section-items',\n\t\t\tsection_id: payload.section_id,\n\t\t\titems: JSON.stringify( payload.items ),\n\t\t\tlast_section: state.sections[ state.sections.length - 1 ] === ( payload.section_id ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\t// console.log(result);\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n};\n\nexport default CourseCurriculum;\n","const Course = {\n\theartbeat: function( context ) {\n\t\tLP.Request( {\n\t\t\ttype: 'heartbeat',\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\t\t\t\tcontext.commit( 'UPDATE_HEART_BEAT', !! result.success );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_HEART_BEAT', false );\n\t\t\t}\n\t\t);\n\t},\n\n\tdraftCourse: function( context, payload ) {\n\t\tvar auto_draft = context.getters.autoDraft;\n\n\t\tif ( auto_draft ) {\n\t\t\tLP.Request( {\n\t\t\t\ttype: 'draft-course',\n\t\t\t\tcourse: JSON.stringify( payload ),\n\t\t\t} ).then( function( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( ! result.success ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontext.commit( 'UPDATE_AUTO_DRAFT_STATUS', false );\n\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\n\tnewRequest: function( context ) {\n\t\tcontext.commit( 'INCREASE_NUMBER_REQUEST' );\n\t\tcontext.commit( 'UPDATE_STATUS', 'loading' );\n\n\t\twindow.onbeforeunload = function() {\n\t\t\treturn '';\n\t\t};\n\t},\n\n\trequestCompleted: function( context, status ) {\n\t\tcontext.commit( 'DECREASE_NUMBER_REQUEST' );\n\n\t\tif ( context.getters.currentRequest === 0 ) {\n\t\t\tcontext.commit( 'UPDATE_STATUS', status );\n\t\t\twindow.onbeforeunload = null;\n\t\t}\n\t},\n};\n\nexport default Course;\n","const ModalCourseItems = {\n\n\ttoggle: function( context ) {\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\topen: function( context, sectionId ) {\n\t\tcontext.commit( 'SET_SECTION', sectionId );\n\t\tcontext.commit( 'RESET' );\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\tsearchItems: function( context, payload ) {\n\t\tcontext.commit( 'SEARCH_ITEMS_REQUEST' );\n\n\t\tLP.Request( {\n\t\t\ttype: 'search-items',\n\t\t\tquery: payload.query,\n\t\t\titem_type: payload.type,\n\t\t\tpage: payload.page,\n\t\t\texclude: JSON.stringify( [] ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( ! result.success ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar data = result.data;\n\n\t\t\t\tcontext.commit( 'SET_LIST_ITEMS', data.items );\n\t\t\t\tcontext.commit( 'UPDATE_PAGINATION', data.pagination );\n\t\t\t\tcontext.commit( 'SEARCH_ITEMS_SUCCESS' );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'SEARCH_ITEMS_FAILURE' );\n\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\taddItem: function( context, item ) {\n\t\tcontext.commit( 'ADD_ITEM', item );\n\t},\n\n\tremoveItem: function( context, index ) {\n\t\tcontext.commit( 'REMOVE_ADDED_ITEM', index );\n\t},\n\n\taddItemsToSection: function( context ) {\n\t\tvar items = context.getters.addedItems;\n\n\t\tif ( items.length > 0 ) {\n\t\t\tLP.Request( {\n\t\t\t\ttype: 'add-items-to-section',\n\t\t\t\tsection_id: context.getters.section,\n\t\t\t\titems: JSON.stringify( items ),\n\t\t\t} ).then(\n\t\t\t\tfunction( response ) {\n\t\t\t\t\tvar result = response.body;\n\n\t\t\t\t\tif ( result.success ) {\n\t\t\t\t\t\tcontext.commit( 'TOGGLE' );\n\n\t\t\t\t\t\tvar items = result.data;\n\t\t\t\t\t\tcontext.commit( 'ss/UPDATE_SECTION_ITEMS', {\n\t\t\t\t\t\t\tsection_id: context.getters.section,\n\t\t\t\t\t\t\titems: items,\n\t\t\t\t\t\t}, { root: true } );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction( error ) {\n\t\t\t\t\tconsole.error( error );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n};\n\nexport default ModalCourseItems;\n","const CourseCurriculum = {\n\tsections: function( state ) {\n\t\treturn state.sections || [];\n\t},\n\turlEdit: function( state ) {\n\t\treturn state.urlEdit;\n\t},\n\thiddenSections: function( state ) {\n\t\treturn state.sections\n\t\t\t.filter( function( section ) {\n\t\t\t\treturn ! section.open;\n\t\t\t} )\n\t\t\t.map( function( section ) {\n\t\t\t\treturn parseInt( section.id );\n\t\t\t} );\n\t},\n\tisHiddenAllSections: function( state, getters ) {\n\t\tvar sections = getters.sections;\n\t\tvar hiddenSections = getters.hiddenSections;\n\n\t\treturn hiddenSections.length === sections.length;\n\t},\n\tstatusUpdateSection: function( state ) {\n\t\treturn state.statusUpdateSection;\n\t},\n\tstatusUpdateSectionItem: function( state ) {\n\t\treturn state.statusUpdateSectionItem;\n\t},\n};\n\nexport default CourseCurriculum;\n","const Course = {\n\theartbeat: function( state ) {\n\t\treturn state.heartbeat;\n\t},\n\taction: function( state ) {\n\t\treturn state.action;\n\t},\n\tid: function( state ) {\n\t\treturn state.course_id;\n\t},\n\tautoDraft: function( state ) {\n\t\treturn state.auto_draft;\n\t},\n\tdisable_curriculum: function( state ) {\n\t\treturn state.disable_curriculum;\n\t},\n\tstatus: function( state ) {\n\t\treturn state.status || 'error';\n\t},\n\tcurrentRequest: function( state ) {\n\t\treturn state.countCurrentRequest || 0;\n\t},\n\turlAjax: function( state ) {\n\t\treturn state.ajax;\n\t},\n\tnonce: function( state ) {\n\t\treturn state.nonce;\n\t},\n};\n\nexport default Course;\n","\nconst Getters = {\n\tstatus: function( state ) {\n\t\treturn state.status;\n\t},\n\tpagination: function( state ) {\n\t\treturn state.pagination;\n\t},\n\titems: function( state, _getters ) {\n\t\treturn state.items.map( function( item ) {\n\t\t\tvar find = _getters.addedItems.find( function( _item ) {\n\t\t\t\treturn item.id === _item.id;\n\t\t\t} );\n\n\t\t\titem.added = !! find;\n\n\t\t\treturn item;\n\t\t} );\n\t},\n\taddedItems: function( state ) {\n\t\treturn state.addedItems;\n\t},\n\tisOpen: function( state ) {\n\t\treturn state.open;\n\t},\n\ttypes: function( state ) {\n\t\treturn state.types;\n\t},\n\tsection: function( state ) {\n\t\treturn state.sectionId;\n\t},\n};\n\nexport default Getters;\n","export default function HTTP( options ) {\n\tconst $ = window.jQuery || jQuery;\n\tconst $VueHTTP = Vue.http;\n\n\toptions = $.extend( {\n\t\tns: 'LPRequest',\n\t\tstore: false,\n\t}, options || {} );\n\n\tlet $publishingAction = null;\n\n\tLP.Request = function( payload ) {\n\t\t$publishingAction = $( '#publishing-action' );\n\n\t\tpayload.id = options.store.getters.id;\n\t\tpayload.nonce = options.store.getters.nonce;\n\t\tpayload[ 'lp-ajax' ] = options.store.getters.action;\n\t\tpayload.code = options.store.getters.code;\n\n\t\t$publishingAction.find( '#publish' ).addClass( 'disabled' );\n\t\t$publishingAction.find( '.spinner' ).addClass( 'is-active' );\n\t\t$publishingAction.addClass( 'code-' + payload.code );\n\n\t\treturn $VueHTTP.post( options.store.getters.urlAjax,\n\t\t\tpayload,\n\t\t\t{\n\t\t\t\temulateJSON: true,\n\t\t\t\tparams: {\n\t\t\t\t\tnamespace: options.ns,\n\t\t\t\t\tcode: payload.code,\n\t\t\t\t},\n\t\t\t} );\n\t};\n\n\t$VueHTTP.interceptors.push( function( request, next ) {\n\t\tif ( request.params.namespace !== options.ns ) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\n\t\toptions.store.dispatch( 'newRequest' );\n\n\t\tnext( function( response ) {\n\t\t\tif ( ! jQuery.isPlainObject( response.body ) ) {\n\t\t\t\tresponse.body = LP.parseJSON( response.body );\n\t\t\t}\n\n\t\t\tconst body = response.body;\n\t\t\tconst result = body.success || false;\n\n\t\t\tif ( result ) {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'successful' );\n\t\t\t} else {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'failed' );\n\t\t\t}\n\n\t\t\t$publishingAction.removeClass( 'code-' + request.params.code );\n\n\t\t\tif ( ! $publishingAction.attr( 'class' ) ) {\n\t\t\t\t$publishingAction.find( '#publish' ).removeClass( 'disabled' );\n\t\t\t\t$publishingAction.find( '.spinner' ).removeClass( 'is-active' );\n\t\t\t}\n\t\t} );\n\t} );\n}\n","const CourseCurriculum = {\n\tSORT_SECTION( state, orders ) {\n\t\tstate.sections = state.sections.map( function( section ) {\n\t\t\tsection.order = orders[ section.id ];\n\n\t\t\treturn section;\n\t\t} );\n\t},\n\tSET_SECTIONS( state, sections ) {\n\t\tstate.sections = sections;\n\t},\n\tADD_NEW_SECTION( state, newSection ) {\n\t\tif ( newSection.open === undefined ) {\n\t\t\tnewSection.open = true;\n\t\t}\n\t\tlet pos;\n\n\t\tif ( newSection.temp_id ) {\n\t\t\tstate.sections.map( function( section, i ) {\n\t\t\t\tif ( newSection.temp_id == section.id ) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tif ( pos !== undefined ) {\n\t\t\t$Vue.set( state.sections, pos, newSection );\n\t\t} else {\n\t\t\tstate.sections.push( newSection );\n\t\t}\n\t},\n\tADD_EMPTY_SECTION( state, section ) {\n\t\tsection.open = true;\n\t\tstate.sections.push( section );\n\t},\n\tREMOVE_SECTION( state, index ) {\n\t\tstate.sections.splice( index, 1 );\n\t},\n\tREMOVE_SECTION_ITEM( state, payload ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn ( section.id === payload.section_id );\n\t\t} );\n\n\t\tlet items = section.items || [],\n\t\t\titem = payload.item,\n\t\t\tindex = -1;\n\t\titems.forEach( function( it, i ) {\n\t\t\tif ( it.id === item.id ) {\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t} );\n\n\t\tif ( index !== -1 ) {\n\t\t\tif ( payload.oldId !== undefined ) {\n\t\t\t\titems[ index ].id = payload.oldId;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( item.temp_id ) {\n\t\t\t\titems[ index ].id = item.temp_id;\n\t\t\t} else {\n\t\t\t\titems.splice( index, 1 );\n\t\t\t}\n\t\t}\n\t},\n\tUPDATE_SECTION_ITEMS( state, payload ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn parseInt( section.id ) === parseInt( payload.section_id );\n\t\t} );\n\n\t\tif ( ! section ) {\n\t\t\treturn;\n\t\t}\n\t\tsection.items = payload.items;\n\t},\n\tUPDATE_SECTION_ITEM( state, payload ) {\n\n\t},\n\n\tCLOSE_SECTION( state, section ) {\n\t\tstate.sections.forEach( function( _section, index ) {\n\t\t\tif ( section.id === _section.id ) {\n\t\t\t\tstate.sections[ index ].open = false;\n\t\t\t}\n\t\t} );\n\t},\n\n\tOPEN_SECTION( state, section ) {\n\t\tstate.sections.forEach( function( _section, index ) {\n\t\t\tif ( section.id === _section.id ) {\n\t\t\t\tstate.sections[ index ].open = true;\n\t\t\t}\n\t\t} );\n\t},\n\n\tOPEN_ALL_SECTIONS( state ) {\n\t\tstate.sections = state.sections.map( function( _section ) {\n\t\t\t_section.open = true;\n\n\t\t\treturn _section;\n\t\t} );\n\t},\n\n\tCLOSE_ALL_SECTIONS( state ) {\n\t\tstate.sections = state.sections.map( function( _section ) {\n\t\t\t_section.open = false;\n\n\t\t\treturn _section;\n\t\t} );\n\t},\n\n\tUPDATE_SECTION_REQUEST( state, sectionId ) {\n\t\t$Vue.set( state.statusUpdateSection, sectionId, 'updating' );\n\t},\n\n\tUPDATE_SECTION_SUCCESS( state, sectionId ) {\n\t\t$Vue.set( state.statusUpdateSection, sectionId, 'successful' );\n\t},\n\n\tUPDATE_SECTION_FAILURE( state, sectionId ) {\n\t\t$Vue.set( state.statusUpdateSection, sectionId, 'failed' );\n\t},\n\n\tUPDATE_SECTION_ITEM_REQUEST( state, itemId ) {\n\t\t$Vue.set( state.statusUpdateSectionItem, itemId, 'updating' );\n\t},\n\n\tUPDATE_SECTION_ITEM_SUCCESS( state, itemId ) {\n\t\t$Vue.set( state.statusUpdateSectionItem, itemId, 'successful' );\n\t},\n\n\tUPDATE_SECTION_ITEM_FAILURE( state, itemId ) {\n\t\t$Vue.set( state.statusUpdateSectionItem, itemId, 'failed' );\n\t},\n\tAPPEND_EMPTY_ITEM_TO_SECTION( state, data ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn parseInt( section.id ) === parseInt( data.section_id );\n\t\t} );\n\n\t\tif ( ! section ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsection.items.push( { id: data.item.id, title: data.item.title, type: 'empty-item' } );\n\t},\n\tUPDATE_ITEM_SECTION_BY_ID( state, data ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn parseInt( section.id ) === parseInt( data.section_id );\n\t\t} );\n\n\t\tif ( ! section ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( let i = 0; i < section.items.length; i++ ) {\n\t\t\ttry {\n\t\t\t\tif ( ! section.items[ i ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst item_id = section.items[ i ].id;\n\n\t\t\t\tif ( item_id ) {\n\t\t\t\t\tif ( data.items[ item_id ] ) {\n\t\t\t\t\t\t$Vue.set( section.items, i, data.items[ item_id ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( ex ) {\n\t\t\t\tconsole.log( ex );\n\t\t\t}\n\t\t}\n\n\t\t//section.items.push({id: data.item.id, title: data.item.title, type: 'empty-item'});\n\t},\n};\n\nexport default CourseCurriculum;\n","const Course = {\n\n\tUPDATE_HEART_BEAT: function( state, status ) {\n\t\tstate.heartbeat = !! status;\n\t},\n\n\tUPDATE_AUTO_DRAFT_STATUS: function( state, status ) {\n\t\tstate.auto_draft = status;\n\t},\n\n\tUPDATE_STATUS: function( state, status ) {\n\t\tstate.status = status;\n\t},\n\n\tINCREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest++;\n\t},\n\n\tDECREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest--;\n\t},\n};\n\nexport default Course;\n","const Mutations = {\n\tTOGGLE: function( state ) {\n\t\tstate.open = ! state.open;\n\t},\n\tSET_SECTION: function( state, sectionId ) {\n\t\tstate.sectionId = sectionId;\n\t},\n\tSET_LIST_ITEMS: function( state, items ) {\n\t\tstate.items = items;\n\t},\n\tADD_ITEM: function( state, item ) {\n\t\tstate.addedItems.push( item );\n\t},\n\tREMOVE_ADDED_ITEM: function( state, item ) {\n\t\tstate.addedItems.forEach( function( _item, index ) {\n\t\t\tif ( _item.id === item.id ) {\n\t\t\t\tstate.addedItems.splice( index, 1 );\n\t\t\t}\n\t\t} );\n\t},\n\tRESET: function( state ) {\n\t\tstate.addedItems = [];\n\t\tstate.items = [];\n\t},\n\tUPDATE_PAGINATION: function( state, pagination ) {\n\t\tstate.pagination = pagination;\n\t},\n\tSEARCH_ITEMS_REQUEST: function( state ) {\n\t\tstate.status = 'loading';\n\t},\n\tSEARCH_ITEMS_SUCCESS: function( state ) {\n\t\tstate.status = 'successful';\n\t},\n\tSEARCH_ITEMS_FAILURE: function( state ) {\n\t\tstate.status = 'failed';\n\t},\n};\n\nexport default Mutations;\n","import Actions from '../actions/course-section';\nimport Mutations from '../mutations/course-section';\nimport Getters from '../getters/course-section';\n\nconst $ = window.jQuery;\n\nexport default function( data ) {\n\tvar state = $.extend( {}, data.sections );\n\n\tstate.statusUpdateSection = {};\n\tstate.statusUpdateSectionItem = {};\n\n\tstate.sections = state.sections.map( function( section ) {\n\t\tvar hiddenSections = state.hidden_sections;\n\n\t\tvar find = hiddenSections.find( function( sectionId ) {\n\t\t\treturn parseInt( section.id ) === parseInt( sectionId );\n\t\t} );\n\n\t\tsection.open = ! find;\n\n\t\treturn section;\n\t} );\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: Getters,\n\t\tmutations: Mutations,\n\t\tactions: Actions,\n\t};\n}\n","import ModalCourseItems from '../store/modal-course-items';\nimport CourseSection from '../store/course-section';\nimport i18n from '../store/i18n';\nimport getters from '../getters/course';\nimport mutations from '../mutations/course';\nimport actions from '../actions/course';\n\nconst $ = window.jQuery;\n\nconst Course = function Course( data ) {\n\tvar state = $.extend( {}, data.root );\n\n\tstate.status = 'success';\n\tstate.heartbeat = true;\n\tstate.countCurrentRequest = 0;\n\n\treturn {\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t\tmodules: {\n\t\t\tci: ModalCourseItems( data ),\n\t\t\ti18n: i18n( data.i18n ),\n\t\t\tss: CourseSection( data ),\n\t\t},\n\t};\n};\n\nexport default Course;\n","const $ = window.jQuery || jQuery;\n\nconst i18n = function i18n( i18n ) {\n\tconst state = $.extend( {}, i18n );\n\tconst getters = {\n\t\tall: function( state ) {\n\t\t\treturn state;\n\t\t},\n\t};\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t};\n};\n\nexport default i18n;\n","import getters from '../getters/modal-course-items';\nimport mutations from '../mutations/modal-course-items';\nimport actions from '../actions/modal-course-items';\n\nconst $ = window.jQuery || jQuery;\n\nexport default function( data ) {\n\tvar state = $.extend( {}, data.chooseItems );\n\tstate.sectionId = false;\n\tstate.pagination = '';\n\tstate.status = '';\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import HTTP from './http';\nimport CourseStore from './store/course';\n\nwindow.$Vue = window.$Vue || Vue;\nwindow.$Vuex = window.$Vuex || Vuex;\n\nconst $ = window.jQuery;\n\n/**\n * Init app.\n *\n * @since 3.0.0\n */\n$( document ).ready( function() {\n\twindow.LP_Curriculum_Store = new $Vuex.Store( CourseStore( lpAdminCourseEditorSettings ) );\n\tHTTP( { ns: 'LPCurriculumRequest', store: LP_Curriculum_Store } );\n\n\tsetTimeout( () => {\n\t\twindow.LP_Course_Editor = new $Vue( {\n\t\t\tel: '#admin-editor-lp_course',\n\t\t\ttemplate: '<lp-course-editor></lp-course-editor>',\n\t\t} );\n\t}, 100 );\n} );\n"],"names":["$","window","jQuery","CourseCurriculum","toggleAllSections","context","hidden","getters","isHiddenAllSections","commit","LP","Request","type","hiddenSections","updateSectionsOrder","order","JSON","stringify","then","response","result","body","order_sections","data","error","console","toggleSection","section","open","updateSection","id","catch","removeSection","payload","index","section_id","newSection","name","section_name","temp_id","uniqueId","items","title","success","extend","updateSectionItem","item","removeSectionItem","item_id","rs","alert","oldId","deleteSectionItem","newSectionItem","each","i","a","old_id","updateSectionItems","state","last_section","sections","length","Course","heartbeat","draftCourse","auto_draft","autoDraft","course","newRequest","onbeforeunload","requestCompleted","status","currentRequest","ModalCourseItems","toggle","sectionId","searchItems","query","item_type","page","exclude","pagination","addItem","removeItem","addItemsToSection","addedItems","root","urlEdit","filter","map","parseInt","statusUpdateSection","statusUpdateSectionItem","action","course_id","disable_curriculum","countCurrentRequest","urlAjax","ajax","nonce","Getters","_getters","find","_item","added","isOpen","types","HTTP","options","$VueHTTP","Vue","http","ns","store","$publishingAction","code","addClass","post","emulateJSON","params","namespace","interceptors","push","request","next","dispatch","isPlainObject","parseJSON","removeClass","attr","SORT_SECTION","orders","SET_SECTIONS","ADD_NEW_SECTION","undefined","pos","$Vue","set","ADD_EMPTY_SECTION","REMOVE_SECTION","splice","REMOVE_SECTION_ITEM","forEach","it","UPDATE_SECTION_ITEMS","UPDATE_SECTION_ITEM","CLOSE_SECTION","_section","OPEN_SECTION","OPEN_ALL_SECTIONS","CLOSE_ALL_SECTIONS","UPDATE_SECTION_REQUEST","UPDATE_SECTION_SUCCESS","UPDATE_SECTION_FAILURE","UPDATE_SECTION_ITEM_REQUEST","itemId","UPDATE_SECTION_ITEM_SUCCESS","UPDATE_SECTION_ITEM_FAILURE","APPEND_EMPTY_ITEM_TO_SECTION","UPDATE_ITEM_SECTION_BY_ID","ex","log","UPDATE_HEART_BEAT","UPDATE_AUTO_DRAFT_STATUS","UPDATE_STATUS","INCREASE_NUMBER_REQUEST","DECREASE_NUMBER_REQUEST","Mutations","TOGGLE","SET_SECTION","SET_LIST_ITEMS","ADD_ITEM","REMOVE_ADDED_ITEM","RESET","UPDATE_PAGINATION","SEARCH_ITEMS_REQUEST","SEARCH_ITEMS_SUCCESS","SEARCH_ITEMS_FAILURE","Actions","hidden_sections","namespaced","mutations","actions","CourseSection","i18n","modules","ci","ss","all","chooseItems","CourseStore","$Vuex","Vuex","document","ready","LP_Curriculum_Store","Store","lpAdminCourseEditorSettings","setTimeout","LP_Course_Editor","el","template"],"sourceRoot":""}
assets/js/dist/admin/editor/course.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '863b124d4d9edcd94a9d');
assets/js/dist/admin/editor/question.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'f4735390dfde84120897');
assets/js/dist/admin/editor/question.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/editor/question.js","mappings":";;;;;;;;;;;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ACA;AACA;;AACAhD,CAAC,CAAEQ,QAAF,CAAD,CAAckC,KAAd,CAAqB,YAAW;AAC/B/C,EAAAA,MAAM,CAACqH,iBAAP,GAA2B,IAAIF,KAAK,CAACF,KAAV,CAAiBA,2DAAK,CAAEK,kBAAF,CAAtB,CAA3B;AAEAzC,EAAAA,iDAAI,CAAE;AAAEM,IAAAA,EAAE,EAAE,yBAAN;AAAiCC,IAAAA,KAAK,EAAEiC;AAAxC,GAAF,CAAJ;AAEAE,EAAAA,UAAU,CAAE,MAAM;AACjB,QAAKlH,CAAC,CAAE,2BAAF,CAAD,CAAiCyB,MAAtC,EAA+C;AAC9C9B,MAAAA,MAAM,CAACwH,kBAAP,GAA4B,IAAIN,IAAJ,CAAU;AACrCO,QAAAA,EAAE,EAAE,2BADiC;AAErCC,QAAAA,QAAQ,EAAE;AAF2B,OAAV,CAA5B;AAIA;AACD,GAPS,EAOP,GAPO,CAAV;AAQA,CAbD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/editor/actions/question.js","webpack://learnpress/./assets/src/apps/js/admin/editor/fill-in-blanks.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/question.js","webpack://learnpress/./assets/src/apps/js/admin/editor/http.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/question.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/question.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/editor/question.js"],"sourcesContent":["const Question = {\n\tchangeQuestionType( context, payload ) {\n\t\tconst draftQuestion = undefined !== payload.question ? payload.question : '';\n\n\t\tLP.Request( {\n\t\t\ttype: 'change-question-type',\n\t\t\tquestion_type: payload.type,\n\t\t\tdraft_question: context.getters.autoDraft ? draftQuestion : '',\n\t\t} ).then( function( response ) {\n\t\t\tconst result = response.body;\n\n\t\t\tif ( result.success ) {\n\t\t\t\tcontext.commit( 'UPDATE_AUTO_DRAFT_STATUS', false );\n\t\t\t\tcontext.commit( 'CHANGE_QUESTION_TYPE', result.data );\n\t\t\t}\n\t\t} );\n\t},\n\n\tupdateAnswersOrder( context, order ) {\n\t\tLP.Request( {\n\t\t\ttype: 'sort-answer',\n\t\t\torder,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\t// context.commit('SET_ANSWERS', result.data);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateAnswerTitle( context, answer ) {\n\t\tif ( typeof answer.question_answer_id == 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tanswer = JSON.stringify( answer );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-answer-title',\n\t\t\tanswer,\n\t\t} );\n\t},\n\n\tupdateCorrectAnswer( context, correct ) {\n\t\tLP.Request( {\n\t\t\ttype: 'change-correct',\n\t\t\tcorrect: JSON.stringify( correct ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_ANSWERS', result.data );\n\t\t\t\t\tcontext.commit( 'UPDATE_AUTO_DRAFT_STATUS', false );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteAnswer( context, payload ) {\n\t\tcontext.commit( 'DELETE_ANSWER', payload.id );\n\t\tLP.Request( {\n\t\t\ttype: 'delete-answer',\n\t\t\tanswer_id: payload.id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'SET_ANSWERS', result.data );\n\t\t\t\t} else {\n\t\t\t\t\t// notice error\n\t\t\t\t}\n\t\t\t} );\n\t},\n\n\tnewAnswer( context, data ) {\n\t\tcontext.commit( 'ADD_NEW_ANSWER', data.answer );\n\t\tLP.Request( {\n\t\t\ttype: 'new-answer',\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_ANSWERS', result.data );\n\t\t\t\t} else {\n\t\t\t\t\t// notice error\n\t\t\t\t}\n\t\t\t} );\n\t},\n\n\tnewRequest( context ) {\n\t\tcontext.commit( 'INCREASE_NUMBER_REQUEST' );\n\t\tcontext.commit( 'UPDATE_STATUS', 'loading' );\n\n\t\twindow.onbeforeunload = function() {\n\t\t\treturn '';\n\t\t};\n\t},\n\n\trequestCompleted( context, status ) {\n\t\tcontext.commit( 'DECREASE_NUMBER_REQUEST' );\n\n\t\tif ( context.getters.currentRequest === 0 ) {\n\t\t\tcontext.commit( 'UPDATE_STATUS', status );\n\t\t\twindow.onbeforeunload = null;\n\t\t}\n\t},\n};\n\nexport default Question;\n","( function( $ ) {\n\twindow.FIB = {\n\n\t\tgetSelectedText: function getSelectedText() {\n\t\t\tlet html = '';\n\t\t\tif ( typeof window.getSelection !== 'undefined' ) {\n\t\t\t\tconst sel = window.getSelection();\n\t\t\t\tif ( sel.rangeCount ) {\n\t\t\t\t\tconst container = document.createElement( 'div' );\n\t\t\t\t\tfor ( let i = 0, len = sel.rangeCount; i < len; ++i ) {\n\t\t\t\t\t\tcontainer.appendChild( sel.getRangeAt( i ).cloneContents() );\n\t\t\t\t\t}\n\t\t\t\t\thtml = container.innerHTML;\n\t\t\t\t}\n\t\t\t} else if ( typeof document.selection !== 'undefined' ) {\n\t\t\t\tif ( document.selection.type === 'Text' ) {\n\t\t\t\t\thtml = document.selection.createRange().htmlText;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn html;\n\t\t},\n\n\t\tcreateTextNode( content ) {\n\t\t\treturn document.createTextNode( content );\n\t\t},\n\n\t\tisContainHtml: function isContainHtml( content ) {\n\t\t\tconst $el = $( content ),\n\t\t\t\tsel = 'b.fib-blank';\n\t\t\treturn $el.is( sel ) || $el.find( sel ).length || $el.parent().is( sel );\n\t\t},\n\n\t\tgetSelectionRange: function getSelectionRange() {\n\t\t\tlet t = '';\n\t\t\tif ( window.getSelection ) {\n\t\t\t\tt = window.getSelection();\n\t\t\t} else if ( document.getSelection ) {\n\t\t\t\tt = document.getSelection();\n\t\t\t} else if ( document.selection ) {\n\t\t\t\tt = document.selection.createRange().text;\n\t\t\t}\n\t\t\treturn t;\n\t\t},\n\n\t\touterHTML( $dom ) {\n\t\t\treturn $( '<div>' ).append( $( $dom ).clone() ).html();\n\t\t},\n\n\t\tdoUpgrade( callback ) {\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': 'fib-upgrade',\n\t\t\t\t},\n\t\t\t\tsuccess( res ) {\n\t\t\t\t\tconsole.log( res );\n\t\t\t\t\tcallback && callback.call( res );\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\t};\n\n\t$( document ).ready( function() {\n\t\t$( '#do-upgrade-fib' ).on( 'click', function() {\n\t\t\tconst $button = $( this ).prop( 'disabled', true ).addClass( 'ajaxloading' );\n\t\t\tFIB.doUpgrade( function() {\n\t\t\t\t$button.prop( 'disabled', false ).removeClass( 'ajaxloading' );\n\t\t\t} );\n\t\t} );\n\t} );\n}( jQuery ) );\n","const Question = {\n\tid: function( state ) {\n\t\treturn state.id;\n\t},\n\ttype: function( state ) {\n\t\treturn state.type;\n\t},\n\tcode: function( state ) {\n\t\treturn Date.now();\n\t},\n\tautoDraft: function( state ) {\n\t\treturn state.auto_draft;\n\t},\n\tanswers: function( state ) {\n\t\treturn Object.values( state.answers ) || [];\n\t},\n\tsettings: function( state ) {\n\t\treturn state.setting;\n\t},\n\ttypes: function( state ) {\n\t\treturn state.questionTypes || [];\n\t},\n\tnumberCorrect: function( state ) {\n\t\tvar correct = 0;\n\t\tObject.keys( state.answers ).forEach( function( key ) {\n\t\t\tif ( state.answers[key].is_true === 'yes' ) {\n\t\t\t\tcorrect += 1;\n\t\t\t}\n\t\t} );\n\t\treturn correct;\n\t},\n\tstatus: function( state ) {\n\t\treturn state.status;\n\t},\n\tcurrentRequest: function( state ) {\n\t\treturn state.countCurrentRequest || 0;\n\t},\n\taction: function( state ) {\n\t\treturn state.action;\n\t},\n\tnonce: function( state ) {\n\t\treturn state.nonce;\n\t},\n\texternalComponent: function( state ) {\n\t\treturn state.externalComponent || [];\n\t},\n\tsupportAnswerOptions: function( state ) {\n\t\treturn state.supportAnswerOptions || [];\n\t},\n\tstate: function( state ) {\n\t\treturn state;\n\t},\n\ti18n: function( state ) {\n\t\treturn state.i18n;\n\t},\n};\n\nexport default Question;\n","export default function HTTP( options ) {\n\tconst $ = window.jQuery || jQuery;\n\tconst $VueHTTP = Vue.http;\n\n\toptions = $.extend( {\n\t\tns: 'LPRequest',\n\t\tstore: false,\n\t}, options || {} );\n\n\tlet $publishingAction = null;\n\n\tLP.Request = function( payload ) {\n\t\t$publishingAction = $( '#publishing-action' );\n\n\t\tpayload.id = options.store.getters.id;\n\t\tpayload.nonce = options.store.getters.nonce;\n\t\tpayload[ 'lp-ajax' ] = options.store.getters.action;\n\t\tpayload.code = options.store.getters.code;\n\n\t\t$publishingAction.find( '#publish' ).addClass( 'disabled' );\n\t\t$publishingAction.find( '.spinner' ).addClass( 'is-active' );\n\t\t$publishingAction.addClass( 'code-' + payload.code );\n\n\t\treturn $VueHTTP.post( options.store.getters.urlAjax,\n\t\t\tpayload,\n\t\t\t{\n\t\t\t\temulateJSON: true,\n\t\t\t\tparams: {\n\t\t\t\t\tnamespace: options.ns,\n\t\t\t\t\tcode: payload.code,\n\t\t\t\t},\n\t\t\t} );\n\t};\n\n\t$VueHTTP.interceptors.push( function( request, next ) {\n\t\tif ( request.params.namespace !== options.ns ) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\n\t\toptions.store.dispatch( 'newRequest' );\n\n\t\tnext( function( response ) {\n\t\t\tif ( ! jQuery.isPlainObject( response.body ) ) {\n\t\t\t\tresponse.body = LP.parseJSON( response.body );\n\t\t\t}\n\n\t\t\tconst body = response.body;\n\t\t\tconst result = body.success || false;\n\n\t\t\tif ( result ) {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'successful' );\n\t\t\t} else {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'failed' );\n\t\t\t}\n\n\t\t\t$publishingAction.removeClass( 'code-' + request.params.code );\n\n\t\t\tif ( ! $publishingAction.attr( 'class' ) ) {\n\t\t\t\t$publishingAction.find( '#publish' ).removeClass( 'disabled' );\n\t\t\t\t$publishingAction.find( '.spinner' ).removeClass( 'is-active' );\n\t\t\t}\n\t\t} );\n\t} );\n}\n","const Question = {\n\n\tUPDATE_STATUS: function( state, status ) {\n\t\tstate.status = status;\n\t},\n\n\tUPDATE_AUTO_DRAFT_STATUS: function( state, status ) {\n\t\tstate.auto_draft = status;\n\t},\n\n\tCHANGE_QUESTION_TYPE: function( state, question ) {\n\t\tstate.answers = question.answers;\n\t\tstate.type = question.type;\n\t},\n\n\tSET_ANSWERS: function( state, answers ) {\n\t\tstate.answers = answers;\n\t},\n\n\tDELETE_ANSWER: function( state, id ) {\n\t\tfor ( var i = 0, n = state.answers.length; i < n; i++ ) {\n\t\t\tif ( state.answers[i].question_answer_id == id ) {\n\t\t\t\tstate.answers[i].question_answer_id = LP.uniqueId();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t},\n\n\tADD_NEW_ANSWER: function( state, answer ) {\n\t\tstate.answers.push( answer );\n\t},\n\n\tUPDATE_ANSWERS: function( state, answers ) {\n\t\tstate.answers = answers;\n\t},\n\n\tINCREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest++;\n\t},\n\n\tDECREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest--;\n\t},\n};\n\nexport default Question;\n","import getters from '../getters/question';\nimport mutations from '../mutations/question';\nimport actions from '../actions/question';\n\nconst $ = window.jQuery || jQuery;\n\nconst Question = function Question( data ) {\n\tvar state = $.extend( {\n\t\tstatus: 'successful',\n\t\tcountCurrentRequest: 0,\n\t\ti18n: $.extend( {}, data.i18n ),\n\t}, data.root );\n\n\treturn {\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n};\n\nexport default Question;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import HTTP from './http';\nimport Store from './store/question';\nimport './fill-in-blanks';\n\nwindow.$Vue = window.$Vue || Vue;\nwindow.$Vuex = window.$Vuex || Vuex;\n\nconst $ = window.jQuery;\n\n/**\n * Init app.\n *\n * @since 3.0.0\n */\n$( document ).ready( function() {\n\twindow.LP_Question_Store = new $Vuex.Store( Store( lp_question_editor ) );\n\n\tHTTP( { ns: 'LPQuestionEditorRequest', store: LP_Question_Store } );\n\n\tsetTimeout( () => {\n\t\tif ( $( '#admin-editor-lp_question' ).length ) {\n\t\t\twindow.LP_Question_Editor = new $Vue( {\n\t\t\t\tel: '#admin-editor-lp_question',\n\t\t\t\ttemplate: '<lp-question-editor></lp-question-editor>',\n\t\t\t} );\n\t\t}\n\t}, 100 );\n} );\n"],"names":["Question","changeQuestionType","context","payload","draftQuestion","undefined","question","LP","Request","type","question_type","draft_question","getters","autoDraft","then","response","result","body","success","commit","data","updateAnswersOrder","order","updateAnswerTitle","answer","question_answer_id","JSON","stringify","updateCorrectAnswer","correct","deleteAnswer","id","answer_id","newAnswer","newRequest","window","onbeforeunload","requestCompleted","status","currentRequest","$","FIB","getSelectedText","html","getSelection","sel","rangeCount","container","document","createElement","i","len","appendChild","getRangeAt","cloneContents","innerHTML","selection","createRange","htmlText","createTextNode","content","isContainHtml","$el","is","find","length","parent","getSelectionRange","t","text","outerHTML","$dom","append","clone","doUpgrade","callback","ajax","url","res","console","log","call","ready","on","$button","prop","addClass","removeClass","jQuery","state","code","Date","now","auto_draft","answers","Object","values","settings","setting","types","questionTypes","numberCorrect","keys","forEach","key","is_true","countCurrentRequest","action","nonce","externalComponent","supportAnswerOptions","i18n","HTTP","options","$VueHTTP","Vue","http","extend","ns","store","$publishingAction","post","urlAjax","emulateJSON","params","namespace","interceptors","push","request","next","dispatch","isPlainObject","parseJSON","attr","UPDATE_STATUS","UPDATE_AUTO_DRAFT_STATUS","CHANGE_QUESTION_TYPE","SET_ANSWERS","DELETE_ANSWER","n","uniqueId","ADD_NEW_ANSWER","UPDATE_ANSWERS","INCREASE_NUMBER_REQUEST","DECREASE_NUMBER_REQUEST","mutations","actions","root","Store","$Vue","$Vuex","Vuex","LP_Question_Store","lp_question_editor","setTimeout","LP_Question_Editor","el","template"],"sourceRoot":""}
assets/js/dist/admin/editor/question.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'c5d10ff894dff82e8a84');
assets/js/dist/admin/editor/quiz.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '6fe4d906b7139998ca0d');
assets/js/dist/admin/editor/quiz.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/editor/quiz.js","mappings":";;;;;;;;;;;AAAA,MAAMA,cAAc,GAAG;AAEtBC,EAAAA,MAAM,EAAE,UAAUC,OAAV,EAAoB;AAC3BA,IAAAA,OAAO,CAACC,MAAR,CAAgB,QAAhB;AACA,GAJqB;AAMtB;AACAC,EAAAA,IAAI,EAAE,UAAUF,OAAV,EAAmBG,MAAnB,EAA4B;AACjCH,IAAAA,OAAO,CAACC,MAAR,CAAgB,UAAhB,EAA4BE,MAA5B;AACAH,IAAAA,OAAO,CAACC,MAAR,CAAgB,OAAhB;AACAD,IAAAA,OAAO,CAACC,MAAR,CAAgB,QAAhB;AACA,GAXqB;AAatB;AACAG,EAAAA,WAAW,EAAE,UAAUJ,OAAV,EAAmBK,OAAnB,EAA6B;AACzCL,IAAAA,OAAO,CAACC,MAAR,CAAgB,qBAAhB;AAEAK,IAAAA,EAAE,CAACC,OAAH,CAAY;AACXC,MAAAA,IAAI,EAAE,cADK;AAEXC,MAAAA,KAAK,EAAEJ,OAAO,CAACI,KAFJ;AAGXC,MAAAA,IAAI,EAAEL,OAAO,CAACK,IAHH;AAIXC,MAAAA,OAAO,EAAEC,IAAI,CAACC,SAAL,CAAgB,EAAhB;AAJE,KAAZ,EAKIC,IALJ,CAMC,UAAUC,QAAV,EAAqB;AACpB,UAAIC,MAAM,GAAGD,QAAQ,CAACE,IAAtB;;AAEA,UAAK,CAAED,MAAM,CAACE,OAAd,EAAwB;A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ACjB1C,IAAAA,MAAM,CAACwN,cAAP,GAAwB,IAAIlD,IAAJ,CAAU;AACjCmD,MAAAA,EAAE,EAAE,uBAD6B;AAEjCC,MAAAA,QAAQ,EAAE;AAFuB,KAAV,CAAxB;AAIA,GALS,EAKP,GALO,CAAV;AAMA,CAVD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/editor/actions/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/quiz.js","webpack://learnpress/./assets/src/apps/js/admin/editor/fill-in-blanks.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/quiz.js","webpack://learnpress/./assets/src/apps/js/admin/editor/http.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/quiz.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/i18n.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/quiz.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/editor/quiz.js"],"sourcesContent":["const ModalQuizItems = {\n\n\ttoggle: function( context ) {\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\t// open modal\n\topen: function( context, quizId ) {\n\t\tcontext.commit( 'SET_QUIZ', quizId );\n\t\tcontext.commit( 'RESET' );\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\t// query available question\n\tsearchItems: function( context, payload ) {\n\t\tcontext.commit( 'SEARCH_ITEM_REQUEST' );\n\n\t\tLP.Request( {\n\t\t\ttype: 'search-items',\n\t\t\tquery: payload.query,\n\t\t\tpage: payload.page,\n\t\t\texclude: JSON.stringify( [] ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( ! result.success ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar data = result.data;\n\n\t\t\t\tcontext.commit( 'SET_LIST_ITEMS', data.items );\n\t\t\t\tcontext.commit( 'UPDATE_PAGINATION', data.pagination );\n\t\t\t\tcontext.commit( 'SEARCH_ITEM_SUCCESS' );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'SEARCH_ITEMS_FAIL' );\n\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\t// add question\n\taddItem: function( context, item ) {\n\t\tcontext.commit( 'ADD_ITEM', item );\n\t},\n\n\t// remove question\n\tremoveItem: function( context, index ) {\n\t\tcontext.commit( 'REMOVE_ADDED_ITEM', index );\n\t},\n\n\taddQuestionsToQuiz: function( context, quiz ) {\n\t\tvar items = context.getters.addedItems;\n\t\tif ( items.length > 0 ) {\n\t\t\tLP.Request( {\n\t\t\t\ttype: 'add-questions-to-quiz',\n\t\t\t\titems: JSON.stringify( items ),\n\t\t\t\tdraft_quiz: JSON.stringify( quiz ),\n\t\t\t} ).then(\n\t\t\t\tfunction( response ) {\n\t\t\t\t\tvar result = response.body;\n\n\t\t\t\t\tif ( result.success ) {\n\t\t\t\t\t\tvar questions = result.data;\n\n\t\t\t\t\t\t// update quiz list questions\n\t\t\t\t\t\tcontext.commit( 'lqs/SET_QUESTIONS', questions, { root: true } );\n\t\t\t\t\t\tcontext.commit( 'TOGGLE' );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction( error ) {\n\t\t\t\t\tconsole.log( error );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n};\n\nexport default ModalQuizItems;\n","const $ = window.jQuery;\n\nconst QuestionList = {\n\n\ttoggleAll: function( context ) {\n\t\tvar hidden = context.getters.isHiddenListQuestions;\n\n\t\tif ( hidden ) {\n\t\t\tcontext.commit( 'OPEN_LIST_QUESTIONS' );\n\t\t} else {\n\t\t\tcontext.commit( 'CLOSE_LIST_QUESTIONS' );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-questions',\n\t\t\thidden: context.getters.hiddenQuestions,\n\t\t} );\n\t},\n\n\tupdateQuizQuestionsHidden: function( context, data ) {\n\t\tLP.Request( $.extend( {}, data, {\n\t\t\ttype: 'update-quiz-questions-hidden',\n\t\t} ) );\n\t},\n\n\tnewQuestion: function( context, payload ) {\n\t\tvar newQuestion = JSON.parse( JSON.stringify( payload.question ) );\n\t\tnewQuestion.settings = {};\n\t\tcontext.commit( 'ADD_NEW_QUESTION', newQuestion );\n\n\t\tLP.Request( {\n\t\t\ttype: 'new-question',\n\t\t\tquestion: JSON.stringify( payload.question ),\n\t\t\tdraft_quiz: JSON.stringify( payload.quiz ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_NEW_QUESTION_TYPE', payload.question.type, { root: true } );\n\t\t\t\t\tcontext.commit( 'ADD_NEW_QUESTION', result.data );\n\t\t\t\t\tcontext.commit( 'CLOSE_LIST_QUESTIONS' );\n\t\t\t\t\tcontext.commit( 'OPEN_QUESTION', result.data );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionsOrder: function( context, order ) {\n\t\tLP.Request( {\n\t\t\ttype: 'sort-questions',\n\t\t\torder: JSON.stringify( order ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tcontext.commit( 'SORT_QUESTIONS', order );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionTitle: function( context, question ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', question.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-title',\n\t\t\tquestion: JSON.stringify( question ),\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question.id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question.id );\n\t\t\t} );\n\t},\n\n\tchangeQuestionType: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'change-question-type',\n\t\t\tquestion_id: payload.question_id,\n\t\t\tquestion_type: payload.type,\n\t\t} ).then( function( response ) {\n\t\t\tvar result = response.body;\n\n\t\t\tif ( result.success ) {\n\t\t\t\tvar question = result.data;\n\t\t\t\tcontext.commit( 'CHANGE_QUESTION_TYPE', question );\n\t\t\t\tcontext.commit( 'UPDATE_NEW_QUESTION_TYPE', question.type.key, { root: true } );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t}\n\t\t} ).catch( function() {\n\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t} );\n\t},\n\n\tisHiddenQuestionsSettings: function( context, id ) {\n\t},\n\n\tcloneQuestion: function( context, question ) {\n\t\tLP.Request( {\n\t\t\ttype: 'clone-question',\n\t\t\tquestion: JSON.stringify( question ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tvar question = result.data;\n\n\t\t\t\t\tcontext.commit( 'ADD_NEW_QUESTION', result.data );\n\t\t\t\t\tcontext.commit( 'UPDATE_NEW_QUESTION_TYPE', question.type.key, { root: true } );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tremoveQuestion: function( context, question ) {\n\t\tvar question_id = question.id;\n\t\tquestion.temp_id = LP.uniqueId();\n\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\n\t\tLP.Request( {\n\t\t\ttype: 'remove-question',\n\t\t\tquestion_id: question_id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tquestion.id = question.temp_id;\n\t\t\t\t\tquestion.temp_id = 0;\n\t\t\t\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteQuestion: function( context, question ) {\n\t\tvar question_id = question.id;\n\t\tquestion.temp_id = LP.uniqueId();\n\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\t\tLP.Request( {\n\t\t\ttype: 'delete-question',\n\t\t\tquestion_id: question_id,\n\t\t} )\n\t\t\t.then( function() {\n\t\t\t\tquestion.id = question.temp_id;\n\t\t\t\tquestion.temp_id = 0;\n\t\t\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question.id );\n\t\t\t} )\n\t\t\t.catch( function() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question.id );\n\t\t\t} );\n\t},\n\n\ttoggleQuestion: function( context, question ) {\n\t\tif ( question.open ) {\n\t\t\tcontext.commit( 'CLOSE_QUESTION', question );\n\t\t} else {\n\t\t\tcontext.commit( 'OPEN_QUESTION', question );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-questions',\n\t\t\thidden: context.getters.hiddenQuestions,\n\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionAnswersOrder: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'sort-question-answers',\n\t\t\tquestion_id: payload.question_id,\n\t\t\torder: JSON.stringify( payload.order ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body,\n\t\t\t\t\torder = result.data;\n\t\t\t\tcontext.commit( 'SORT_QUESTION_ANSWERS', order );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionAnswerTitle: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-answer-title',\n\t\t\tquestion_id: parseInt( payload.question_id ),\n\t\t\tanswer: JSON.stringify( payload.answer ),\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_ANSWER_SUCCESS', parseInt( payload.question_id ) );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_ANSWER_FAILURE', parseInt( payload.question_id ) );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t} );\n\t},\n\n\tupdateQuestionCorrectAnswer: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'change-question-correct-answer',\n\t\t\tquestion_id: payload.question_id,\n\t\t\tcorrect: JSON.stringify( payload.correct ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'CHANGE_QUESTION_CORRECT_ANSWERS', result.data );\n\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteQuestionAnswer: function( context, payload ) {\n\t\tpayload.temp_id = LP.uniqueId();\n\t\tcontext.commit( 'DELETE_ANSWER', payload );\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'delete-question-answer',\n\t\t\tquestion_id: payload.question_id,\n\t\t\tanswer_id: payload.answer_id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'DELETE_QUESTION_ANSWER', {\n\t\t\t\t\t\tquestion_id: payload.question_id,\n\t\t\t\t\t\tanswer_id: payload.temp_id,\n\t\t\t\t\t\t//answer_id: payload.answer_id\n\t\t\t\t\t} );\n\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tnewQuestionAnswer: function( context, data ) {\n\t\tvar temp_id = LP.uniqueId(),\n\t\t\tquestion_id = data.question_id;\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', question_id );\n\t\tcontext.commit( 'ADD_QUESTION_ANSWER', {\n\t\t\tquestion_id: question_id,\n\t\t\tanswer: { text: LP_Quiz_Store.getters['i18n/all'].new_option, question_answer_id: temp_id },\n\t\t} );\n\t\tLP.Request( {\n\t\t\ttype: 'new-question-answer',\n\t\t\tquestion_id: question_id,\n\t\t\tquestion_answer_id: temp_id,\n\t\t} )\n\t\t\t.then(\n\t\t\t\tfunction( response ) {\n\t\t\t\t\tvar result = response.body;\n\t\t\t\t\tif ( result.success ) {\n\t\t\t\t\t\tvar answer = result.data;\n\t\t\t\t\t\tcontext.commit( 'ADD_QUESTION_ANSWER', { question_id: question_id, answer: answer } );\n\t\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question_id );\n\n\t\t\t\t\t\tdata.success && setTimeout( function() {\n\t\t\t\t\t\t\tdata.success.apply( data.context, [ answer ] );\n\t\t\t\t\t\t}, 300 );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction( error ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question_id );\n\t\t\t\t\tconsole.error( error );\n\t\t\t\t}\n\t\t\t);\n\t},\n\n\tupdateQuestionContent: function( context, question ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', question.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-content',\n\t\t\tquestion: JSON.stringify( question ),\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question.id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question.id );\n\t\t\t} );\n\t},\n\n\tupdateQuestionMeta: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-meta',\n\t\t\tquestion: JSON.stringify( payload.question ),\n\t\t\tmeta_key: payload.meta_key,\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question.id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question.id );\n\t\t\t} );\n\t},\n};\n\nexport default QuestionList;\n","const Quiz = {\n heartbeat: function (context) {\n LP.Request({\n type: 'heartbeat'\n }\n )\n .then(\n function (response) {\n var result = response.body;\n context.commit('UPDATE_HEART_BEAT', !!result.success);\n },\n function (error) {\n context.commit('UPDATE_HEART_BEAT', false);\n }\n );\n },\n\n newRequest: function (context) {\n context.commit('INCREASE_NUMBER_REQUEST');\n context.commit('UPDATE_STATUS', 'loading');\n\n window.onbeforeunload = function () {\n return '';\n }\n },\n\n requestCompleted: function (context, status) {\n context.commit('DECREASE_NUMBER_REQUEST');\n\n if (context.getters.currentRequest === 0) {\n context.commit('UPDATE_STATUS', status);\n window.onbeforeunload = null;\n }\n }\n};\n\nexport default Quiz;","( function( $ ) {\n\twindow.FIB = {\n\n\t\tgetSelectedText: function getSelectedText() {\n\t\t\tlet html = '';\n\t\t\tif ( typeof window.getSelection !== 'undefined' ) {\n\t\t\t\tconst sel = window.getSelection();\n\t\t\t\tif ( sel.rangeCount ) {\n\t\t\t\t\tconst container = document.createElement( 'div' );\n\t\t\t\t\tfor ( let i = 0, len = sel.rangeCount; i < len; ++i ) {\n\t\t\t\t\t\tcontainer.appendChild( sel.getRangeAt( i ).cloneContents() );\n\t\t\t\t\t}\n\t\t\t\t\thtml = container.innerHTML;\n\t\t\t\t}\n\t\t\t} else if ( typeof document.selection !== 'undefined' ) {\n\t\t\t\tif ( document.selection.type === 'Text' ) {\n\t\t\t\t\thtml = document.selection.createRange().htmlText;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn html;\n\t\t},\n\n\t\tcreateTextNode( content ) {\n\t\t\treturn document.createTextNode( content );\n\t\t},\n\n\t\tisContainHtml: function isContainHtml( content ) {\n\t\t\tconst $el = $( content ),\n\t\t\t\tsel = 'b.fib-blank';\n\t\t\treturn $el.is( sel ) || $el.find( sel ).length || $el.parent().is( sel );\n\t\t},\n\n\t\tgetSelectionRange: function getSelectionRange() {\n\t\t\tlet t = '';\n\t\t\tif ( window.getSelection ) {\n\t\t\t\tt = window.getSelection();\n\t\t\t} else if ( document.getSelection ) {\n\t\t\t\tt = document.getSelection();\n\t\t\t} else if ( document.selection ) {\n\t\t\t\tt = document.selection.createRange().text;\n\t\t\t}\n\t\t\treturn t;\n\t\t},\n\n\t\touterHTML( $dom ) {\n\t\t\treturn $( '<div>' ).append( $( $dom ).clone() ).html();\n\t\t},\n\n\t\tdoUpgrade( callback ) {\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': 'fib-upgrade',\n\t\t\t\t},\n\t\t\t\tsuccess( res ) {\n\t\t\t\t\tconsole.log( res );\n\t\t\t\t\tcallback && callback.call( res );\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\t};\n\n\t$( document ).ready( function() {\n\t\t$( '#do-upgrade-fib' ).on( 'click', function() {\n\t\t\tconst $button = $( this ).prop( 'disabled', true ).addClass( 'ajaxloading' );\n\t\t\tFIB.doUpgrade( function() {\n\t\t\t\t$button.prop( 'disabled', false ).removeClass( 'ajaxloading' );\n\t\t\t} );\n\t\t} );\n\t} );\n}( jQuery ) );\n","const ModalQuizItems = {\n\tstatus: function( state ) {\n\t\treturn state.status;\n\t},\n\tpagination: function( state ) {\n\t\treturn state.pagination;\n\t},\n\titems: function( state, _getters ) {\n\t\treturn state.items.map( function( item ) {\n\t\t\tvar find = _getters.addedItems.find( function( _item ) {\n\t\t\t\treturn item.id === _item.id;\n\t\t\t} );\n\n\t\t\titem.added = !! find;\n\n\t\t\treturn item;\n\t\t} );\n\t},\n\tcode: function( state ) {\n\t\treturn Date.now();\n\t},\n\taddedItems: function( state ) {\n\t\treturn state.addedItems;\n\t},\n\tisOpen: function( state ) {\n\t\treturn state.open;\n\t},\n\tquiz: function( state ) {\n\t\treturn state.quizId;\n\t},\n};\n\nexport default ModalQuizItems;\n","const QuestionList = {\n\tlistQuestions: function( state ) {\n\t\treturn state.questions || [];\n\t},\n\tquestionsOrder: function( state ) {\n\t\treturn state.order || [];\n\t},\n\texternalComponent: function( state ) {\n\t\treturn state.externalComponent || [];\n\t},\n\tsupportAnswerOptions: function( state ) {\n\t\treturn state.supportAnswerOptions || [];\n\t},\n\thiddenQuestionsSettings: function( state ) {\n\t\treturn state.hidden_questions_settings || [];\n\t},\n\thiddenQuestions: function( state ) {\n\t\treturn state.questions\n\t\t\t.filter( function( question ) {\n\t\t\t\treturn ! question.open;\n\t\t\t} )\n\t\t\t.map( function( question ) {\n\t\t\t\treturn parseInt( question.id );\n\t\t\t} );\n\t},\n\tisHiddenListQuestions: function( state, getters ) {\n\t\tvar questions = getters.listQuestions;\n\t\tvar hiddenQuestions = getters.hiddenQuestions;\n\n\t\treturn questions.length === hiddenQuestions.length;\n\t},\n\tdisableUpdateList: function( state ) {\n\t\treturn state.disableUpdateList;\n\t},\n\tstatusUpdateQuestions: function( state ) {\n\t\treturn state.statusUpdateQuestions;\n\t},\n\tstatusUpdateQuestionItem: function( state ) {\n\t\treturn state.statusUpdateQuestionItem;\n\t},\n\tstatusUpdateQuestionAnswer: function( state ) {\n\t\treturn state.statusUpdateQuestionAnswer;\n\t},\n};\n\nexport default QuestionList;\n","const Quiz = {\n\theartbeat: function( state ) {\n\t\treturn state.heartbeat;\n\t},\n\tquestionTypes: function( state ) {\n\t\treturn state.types;\n\t},\n\tdefaultNewQuestionType: function( state ) {\n\t\treturn state.default_new;\n\t},\n\taction: function( state ) {\n\t\treturn state.action;\n\t},\n\tid: function( state ) {\n\t\treturn state.quiz_id;\n\t},\n\tstatus: function( state ) {\n\t\treturn state.status || 'error';\n\t},\n\tcurrentRequest: function( state ) {\n\t\treturn state.countCurrentRequest || 0;\n\t},\n\tnonce: function( state ) {\n\t\treturn state.nonce;\n\t},\n};\n\nexport default Quiz;\n","export default function HTTP( options ) {\n\tconst $ = window.jQuery || jQuery;\n\tconst $VueHTTP = Vue.http;\n\n\toptions = $.extend( {\n\t\tns: 'LPRequest',\n\t\tstore: false,\n\t}, options || {} );\n\n\tlet $publishingAction = null;\n\n\tLP.Request = function( payload ) {\n\t\t$publishingAction = $( '#publishing-action' );\n\n\t\tpayload.id = options.store.getters.id;\n\t\tpayload.nonce = options.store.getters.nonce;\n\t\tpayload[ 'lp-ajax' ] = options.store.getters.action;\n\t\tpayload.code = options.store.getters.code;\n\n\t\t$publishingAction.find( '#publish' ).addClass( 'disabled' );\n\t\t$publishingAction.find( '.spinner' ).addClass( 'is-active' );\n\t\t$publishingAction.addClass( 'code-' + payload.code );\n\n\t\treturn $VueHTTP.post( options.store.getters.urlAjax,\n\t\t\tpayload,\n\t\t\t{\n\t\t\t\temulateJSON: true,\n\t\t\t\tparams: {\n\t\t\t\t\tnamespace: options.ns,\n\t\t\t\t\tcode: payload.code,\n\t\t\t\t},\n\t\t\t} );\n\t};\n\n\t$VueHTTP.interceptors.push( function( request, next ) {\n\t\tif ( request.params.namespace !== options.ns ) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\n\t\toptions.store.dispatch( 'newRequest' );\n\n\t\tnext( function( response ) {\n\t\t\tif ( ! jQuery.isPlainObject( response.body ) ) {\n\t\t\t\tresponse.body = LP.parseJSON( response.body );\n\t\t\t}\n\n\t\t\tconst body = response.body;\n\t\t\tconst result = body.success || false;\n\n\t\t\tif ( result ) {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'successful' );\n\t\t\t} else {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'failed' );\n\t\t\t}\n\n\t\t\t$publishingAction.removeClass( 'code-' + request.params.code );\n\n\t\t\tif ( ! $publishingAction.attr( 'class' ) ) {\n\t\t\t\t$publishingAction.find( '#publish' ).removeClass( 'disabled' );\n\t\t\t\t$publishingAction.find( '.spinner' ).removeClass( 'is-active' );\n\t\t\t}\n\t\t} );\n\t} );\n}\n","const ModalQuizItems = {\n\tTOGGLE: function( state ) {\n\t\tstate.open = ! state.open;\n\t},\n\tSET_QUIZ: function( state, quizId ) {\n\t\tstate.quizId = quizId;\n\t},\n\tSET_LIST_ITEMS: function( state, items ) {\n\t\tstate.items = items;\n\t},\n\tADD_ITEM: function( state, item ) {\n\t\tstate.addedItems.push( item );\n\t},\n\tREMOVE_ADDED_ITEM: function( state, item ) {\n\t\tstate.addedItems.forEach( function( _item, index ) {\n\t\t\tif ( _item.id === item.id ) {\n\t\t\t\tstate.addedItems.splice( index, 1 );\n\t\t\t}\n\t\t} );\n\t},\n\tRESET: function( state ) {\n\t\tstate.addedItems = [];\n\t\tstate.items = [];\n\t},\n\tUPDATE_PAGINATION: function( state, pagination ) {\n\t\tstate.pagination = pagination;\n\t},\n\tSEARCH_ITEM_REQUEST: function( state ) {\n\t\tstate.status = 'loading';\n\t},\n\tSEARCH_ITEM_SUCCESS: function( state ) {\n\t\tstate.status = 'successful';\n\t},\n\tSEARCH_ITEM_FAIL: function( state ) {\n\t\tstate.status = 'fail';\n\t},\n};\n\nexport default ModalQuizItems;\n","var $ = window.jQuery;\n\nconst QuestionList = {\n\tSORT_QUESTIONS: function( state, orders ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tquestion.order = orders[question.id];\n\t\t\treturn question;\n\t\t} );\n\t},\n\tSORT_QUESTION_ANSWERS: function( state, orders ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tquestion.answers.answer_order = orders[question.answers.question_answer_id];\n\t\t\treturn question;\n\t\t} );\n\t},\n\tADD_QUESTION_ANSWER: function( state, payload ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( question.id === payload.question_id ) {\n\t\t\t\tvar found = false;\n\t\t\t\tif ( payload.answer.temp_id ) {\n\t\t\t\t\tfor ( var i = 0, n = question.answers.length; i < n; i++ ) {\n\t\t\t\t\t\tif ( question.answers[i].question_answer_id == payload.answer.temp_id ) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t$Vue.set( question.answers, i, payload.answer );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t! found && question.answers.push( payload.answer );\n\t\t\t\treturn question;\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tCHANGE_QUESTION_CORRECT_ANSWERS: function( state, data ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( parseInt( question.id ) === data.id ) {\n\t\t\t\tquestion.answers = data.answers;\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tSET_QUESTIONS: function( state, questions ) {\n\t\tstate.questions = questions;\n\t},\n\tADD_NEW_QUESTION: function( state, question ) {\n\t\tvar found = false;\n\t\tif ( question.temp_id ) {\n\t\t\tfor ( var i = 0, n = state.questions.length; i < n; i++ ) {\n\t\t\t\tif ( state.questions[i].id === question.temp_id ) {\n\t\t\t\t\t$Vue.set( state.questions, i, question );\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! found ) {\n\t\t\tvar _last_child = $( '.lp-list-questions .main > div:last-child' );\n\t\t\tif ( _last_child.length ) {\n\t\t\t\tvar _offset = _last_child.offset().top;\n\t\t\t\t$( 'html,body' ).animate( { scrollTop: _offset } );\n\t\t\t}\n\n\t\t\tstate.questions.push( question );\n\t\t}\n\t},\n\tCHANGE_QUESTION_TYPE: function( state, data ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( parseInt( question.id ) === data.id ) {\n\t\t\t\tquestion.answers = data.answers;\n\t\t\t\tquestion.type = data.type;\n\t\t\t\tquestion.open = true;\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tREMOVE_QUESTION: function( state, item ) {\n\t\tvar questions = state.questions,\n\t\t\tindex = questions.indexOf( item );\n\n\t\tif ( item.temp_id ) {\n\t\t\tstate.questions[index].id = item.temp_id;\n\t\t} else {\n\t\t\tstate.questions.splice( index, 1 );\n\t\t}\n\t},\n\tDELETE_QUESTION_ANSWER: function( state, payload ) {\n\t\tvar question_id = payload.question_id,\n\t\t\tanswer_id = payload.answer_id;\n\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( question.id === question_id ) {\n\t\t\t\tvar answers = question.answers;\n\t\t\t\tanswers.forEach( function( answer ) {\n\t\t\t\t\tif ( answer.question_answer_id === answer_id ) {\n\t\t\t\t\t\tvar index = answers.indexOf( answer );\n\t\t\t\t\t\tanswers.splice( index, 1 );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tREMOVE_QUESTIONS: function() {\n\t\t// code\n\t},\n\tCLOSE_QUESTION: function( state, question ) {\n\t\tstate.questions.forEach( function( _question, index ) {\n\t\t\tif ( question.id === _question.id ) {\n\t\t\t\tstate.questions[index].open = false;\n\t\t\t}\n\t\t} );\n\t},\n\tOPEN_QUESTION: function( state, question ) {\n\t\tstate.questions.forEach( function( _question, index ) {\n\t\t\tif ( ( question.id ) === _question.id ) {\n\t\t\t\tstate.questions[index].open = true;\n\t\t\t}\n\t\t} );\n\t},\n\tCLOSE_LIST_QUESTIONS: function( state ) {\n\t\tstate.questions = state.questions.map( function( _question ) {\n\t\t\t_question.open = false;\n\n\t\t\treturn _question;\n\t\t} );\n\t},\n\tOPEN_LIST_QUESTIONS: function( state ) {\n\t\tstate.questions = state.questions.map( function( _question ) {\n\t\t\t_question.open = true;\n\n\t\t\treturn _question;\n\t\t} );\n\t},\n\tUPDATE_QUESTION_REQUEST: function( state, questionId ) {\n\t\t$Vue.set( state.statusUpdateQuestionItem, questionId, 'updating' );\n\t},\n\tUPDATE_QUESTION_SUCCESS: function( state, questionID ) {\n\t\t$Vue.set( state.statusUpdateQuestionItem, questionID, 'successful' );\n\t},\n\tUPDATE_QUESTION_FAILURE: function( state, questionID ) {\n\t\t$Vue.set( state.statusUpdateQuestionItem, questionID, 'failed' );\n\t},\n\n\tUPDATE_QUESTION_ANSWER_REQUEST: function( state, question_id ) {\n\t\t$Vue.set( state.statusUpdateQuestionAnswer, question_id, 'updating' );\n\t},\n\tUPDATE_QUESTION_ANSWER_SUCCESS: function( state, question_id ) {\n\t\t$Vue.set( state.statusUpdateQuestionAnswer, question_id, 'successful' );\n\t},\n\tUPDATE_QUESTION_ANSWER_FAIL: function( state, question_id ) {\n\t\t$Vue.set( state.statusUpdateQuestionAnswer, question_id, 'failed' );\n\t},\n\tDELETE_ANSWER: function( state, data ) {\n\t\tstate.questions.map( function( question, index ) {\n\t\t\tif ( question.id == data.question_id ) {\n\t\t\t\tfor ( var i = 0, n = question.answers.length; i < n; i++ ) {\n\t\t\t\t\tif ( question.answers[i].question_answer_id == data.answer_id ) {\n\t\t\t\t\t\tquestion.answers[i].question_answer_id = data.temp_id;\n\t\t\t\t\t\t//state.questions[index].answers.splice(i, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t},\n};\n\nexport default QuestionList;\n","const Quiz = {\n\n\tUPDATE_HEART_BEAT: function( state, status ) {\n\t\tstate.heartbeat = !! status;\n\t},\n\n\tUPDATE_STATUS: function( state, status ) {\n\t\tstate.status = status;\n\t},\n\n\tUPDATE_NEW_QUESTION_TYPE: function( state, type ) {\n\t\tstate.default_new = type;\n\t},\n\n\tINCREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest++;\n\t},\n\n\tDECREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest--;\n\t},\n};\n\nexport default Quiz;\n","const $ = window.jQuery || jQuery;\n\nconst i18n = function i18n( i18n ) {\n\tconst state = $.extend( {}, i18n );\n\tconst getters = {\n\t\tall: function( state ) {\n\t\t\treturn state;\n\t\t},\n\t};\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t};\n};\n\nexport default i18n;\n","import getters from '../getters/modal-quiz-items';\nimport mutations from '../mutations/modal-quiz-items';\nimport actions from '../actions/modal-quiz-items';\n\nconst $ = window.jQuery || jQuery;\n\nconst Quiz = function( data ) {\n\tvar state = $.extend( {\n\t\tquizId: false,\n\t\tpagination: '',\n\t\tstatus: '',\n\t}, data.chooseItems );\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n};\n\nexport default Quiz;\n","import getters from '../getters/question-list';\nimport mutations from '../mutations/question-list';\nimport actions from '../actions/question-list';\n\nconst $ = window.jQuery || jQuery;\n\nconst QuestionList = function QuestionList( data ) {\n\tconst listQuestions = data.listQuestions;\n\tvar state = $.extend( {\n\t\tstatusUpdateQuestions: {},\n\t\tstatusUpdateQuestionItem: {},\n\t\tstatusUpdateQuestionAnswer: {},\n\t\tquestions: listQuestions.questions.map( function( question ) {\n\t\t\tvar hiddenQuestions = listQuestions.hidden_questions;\n\n\t\t\tvar find = hiddenQuestions.find( function( questionId ) {\n\t\t\t\treturn parseInt( question.id ) === parseInt( questionId );\n\t\t\t} );\n\n\t\t\tquestion.open = ! find;\n\n\t\t\treturn question;\n\t\t} ),\n\t}, listQuestions );\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n};\n\nexport default QuestionList;\n","import getters from '../getters/quiz';\nimport mutations from '../mutations/quiz';\nimport actions from '../actions/quiz';\n\nimport ModalQuizItems from '../store/modal-quiz-items';\nimport i18n from '../store/i18n';\nimport QuestionList from '../store/question-list';\n\nconst $ = window.jQuery || jQuery;\n\nconst Quiz = function Quiz( data ) {\n\tconst state = $.extend( {\n\t\tstatus: 'success',\n\t\theartbeat: true,\n\t\tcountCurrentRequest: 0,\n\t}, data.root );\n\n\treturn {\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t\tmodules: {\n\t\t\tcqi: ModalQuizItems( data ),\n\t\t\ti18n: i18n( data.i18n ),\n\t\t\tlqs: QuestionList( data ),\n\t\t},\n\t};\n};\n\nexport default Quiz;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import QuizStore from './store/quiz';\nimport HTTP from './http';\nimport './fill-in-blanks';\n\nwindow.$Vue = window.$Vue || Vue;\nwindow.$Vuex = window.$Vuex || Vuex;\n\n/**\n * Init app.\n *\n * @since 3.0.0\n */\n\nwindow.jQuery( document ).ready( function() {\n\twindow.LP_Quiz_Store = new $Vuex.Store( QuizStore( lp_quiz_editor ) );\n\tHTTP( { ns: 'LPListQuizQuestionsRequest', store: LP_Quiz_Store } );\n\n\tsetTimeout( () => {\n\t\twindow.LP_Quiz_Editor = new $Vue( {\n\t\t\tel: '#admin-editor-lp_quiz',\n\t\t\ttemplate: '<lp-quiz-editor></lp-quiz-editor>',\n\t\t} );\n\t}, 100 );\n} );\n"],"names":["ModalQuizItems","toggle","context","commit","open","quizId","searchItems","payload","LP","Request","type","query","page","exclude","JSON","stringify","then","response","result","body","success","data","items","pagination","error","console","log","addItem","item","removeItem","index","addQuestionsToQuiz","quiz","getters","addedItems","length","draft_quiz","questions","root","$","window","jQuery","QuestionList","toggleAll","hidden","isHiddenListQuestions","hiddenQuestions","updateQuizQuestionsHidden","extend","newQuestion","parse","question","settings","updateQuestionsOrder","order","updateQuestionTitle","id","catch","changeQuestionType","question_id","question_type","key","isHiddenQuestionsSettings","cloneQuestion","removeQuestion","temp_id","uniqueId","deleteQuestion","toggleQuestion","updateQuestionAnswersOrder","updateQuestionAnswerTitle","parseInt","answer","updateQuestionCorrectAnswer","correct","deleteQuestionAnswer","answer_id","newQuestionAnswer","text","LP_Quiz_Store","new_option","question_answer_id","setTimeout","apply","updateQuestionContent","updateQuestionMeta","meta_key","Quiz","heartbeat","newRequest","onbeforeunload","requestCompleted","status","currentRequest","FIB","getSelectedText","html","getSelection","sel","rangeCount","container","document","createElement","i","len","appendChild","getRangeAt","cloneContents","innerHTML","selection","createRange","htmlText","createTextNode","content","isContainHtml","$el","is","find","parent","getSelectionRange","t","outerHTML","$dom","append","clone","doUpgrade","callback","ajax","url","res","call","ready","on","$button","prop","addClass","removeClass","state","_getters","map","_item","added","code","Date","now","isOpen","listQuestions","questionsOrder","externalComponent","supportAnswerOptions","hiddenQuestionsSettings","hidden_questions_settings","filter","disableUpdateList","statusUpdateQuestions","statusUpdateQuestionItem","statusUpdateQuestionAnswer","questionTypes","types","defaultNewQuestionType","default_new","action","quiz_id","countCurrentRequest","nonce","HTTP","options","$VueHTTP","Vue","http","ns","store","$publishingAction","post","urlAjax","emulateJSON","params","namespace","interceptors","push","request","next","dispatch","isPlainObject","parseJSON","attr","TOGGLE","SET_QUIZ","SET_LIST_ITEMS","ADD_ITEM","REMOVE_ADDED_ITEM","forEach","splice","RESET","UPDATE_PAGINATION","SEARCH_ITEM_REQUEST","SEARCH_ITEM_SUCCESS","SEARCH_ITEM_FAIL","SORT_QUESTIONS","orders","SORT_QUESTION_ANSWERS","answers","answer_order","ADD_QUESTION_ANSWER","found","n","$Vue","set","CHANGE_QUESTION_CORRECT_ANSWERS","SET_QUESTIONS","ADD_NEW_QUESTION","_last_child","_offset","offset","top","animate","scrollTop","CHANGE_QUESTION_TYPE","REMOVE_QUESTION","indexOf","DELETE_QUESTION_ANSWER","REMOVE_QUESTIONS","CLOSE_QUESTION","_question","OPEN_QUESTION","CLOSE_LIST_QUESTIONS","OPEN_LIST_QUESTIONS","UPDATE_QUESTION_REQUEST","questionId","UPDATE_QUESTION_SUCCESS","questionID","UPDATE_QUESTION_FAILURE","UPDATE_QUESTION_ANSWER_REQUEST","UPDATE_QUESTION_ANSWER_SUCCESS","UPDATE_QUESTION_ANSWER_FAIL","DELETE_ANSWER","UPDATE_HEART_BEAT","UPDATE_STATUS","UPDATE_NEW_QUESTION_TYPE","INCREASE_NUMBER_REQUEST","DECREASE_NUMBER_REQUEST","i18n","all","namespaced","mutations","actions","chooseItems","hidden_questions","modules","cqi","lqs","QuizStore","$Vuex","Vuex","Store","lp_quiz_editor","LP_Quiz_Editor","el","template"],"sourceRoot":""}
assets/js/dist/admin/editor/quiz.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '539e6e70d3aa82aba79c');
assets/js/dist/admin/pages/dashboard.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'c3021838b672b886c0f4');
assets/js/dist/admin/pages/dashboard.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/dashboard.js","mappings":";;;;;AAAAA,QAAQ,CAACC,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUC,KAAV,EAAkB;AAChE,QAAMC,QAAQ,GAAGH,QAAQ,CAACI,aAAT,CAAwB,mBAAxB,CAAjB;;AAEA,QAAMC,WAAW,GAAG,MAAQC,GAAR,IAAiB;AACpC,QAAI;AACH,YAAMC,QAAQ,GAAG,MAAMC,EAAE,CAACC,QAAH,CAAa;AACnCC,QAAAA,IAAI,EAAEF,EAAE,CAACG,GAAH,CAAOC,YAAP,CAAqB,wBAArB,CAD6B;AAEnCC,QAAAA,MAAM,EAAE;AAF2B,OAAb,CAAvB;;AAKA,UAAKN,QAAQ,CAACO,MAAT,KAAoB,SAApB,IAAiCP,QAAQ,CAACQ,IAA/C,EAAsD;AACrDT,QAAAA,GAAG,CAACU,SAAJ,GAAgBT,QAAQ,CAACQ,IAAzB;AACA,OAFD,MAEO;AACNT,QAAAA,GAAG,CAACU,SAAJ,GAAiB,4DAA4DT,QAAQ,CAACU,OAAT,IAC7EV,QAAQ,CAACU,OAAS,QADlB;AAEA;AACD,KAZD,CAYE,OAAQC,KAAR,EAAgB;AACjBZ,MAAAA,GAAG,CAACU,SAAJ,IAAkB,4DAA4DE,KAAK,CAACD,OAAN,IAC9EC,KAAK,CAACD,OAAS,QADf;AAEA;AACD,GAjBD;;AAmBAZ,EAAAA,WAAW,CAAEF,QAAF,CAAX;AACA,CAvBD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/dashboard.js"],"sourcesContent":["document.addEventListener( 'DOMContentLoaded', function( event ) {\n\tconst elements = document.querySelector( 'ul.lp_append_data' );\n\n\tconst getResponse = async ( ele ) => {\n\t\ttry {\n\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\tpath: wp.url.addQueryArgs( 'lp/v1/orders/statistic' ),\n\t\t\t\tmethod: 'GET',\n\t\t\t} );\n\n\t\t\tif ( response.status === 'success' && response.data ) {\n\t\t\t\tele.innerHTML = response.data;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message error\" style=\"display:block\">${ response.message &&\n\t\t\t\tresponse.message }</div>`;\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tele.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message &&\n\t\t\terror.message }</div>`;\n\t\t}\n\t};\n\n\tgetResponse( elements );\n} );\n"],"names":["document","addEventListener","event","elements","querySelector","getResponse","ele","response","wp","apiFetch","path","url","addQueryArgs","method","status","data","innerHTML","message","error"],"sourceRoot":""}
assets/js/dist/admin/pages/dashboard.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '61e23f32dc55ad90ba18');
assets/js/dist/admin/pages/setup.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'ab358d70fea67a925379');
assets/js/dist/admin/pages/setup.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/setup.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAc;AACf;;AACA,MAAIC,KAAJ,EAAWC,UAAX;;AAEA,QAAMC,SAAS,GAAG,SAASA,SAAT,CAAoBC,KAApB,EAA4B;AAC7C,UAAMC,OAAO,GAAGD,KAAK,CAACE,IAAN,CAAY,qBAAZ,CAAhB;AACA,QAAIC,KAAK,GAAG,IAAZ;AAEAF,IAAAA,OAAO,CAACG,IAAR,CAAc,YAAW;AACxB,YAAMC,KAAK,GAAGT,CAAC,CAAE,IAAF,CAAf;AACAS,MAAAA,KAAK,CAACC,GAAN,CAAW,cAAX,EAA2B,EAA3B;;AAEA,cAASD,KAAK,CAACE,IAAN,CAAY,MAAZ,CAAT;AACA,aAAK,gCAAL;AACA,aAAK,wCAAL;AACC,cAAK,CAAEF,KAAK,CAACG,OAAN,CAAe,IAAf,EAAsBC,IAAtB,GAA6BP,IAA7B,CAAmC,wBAAnC,EAA8DQ,EAA9D,CAAkE,UAAlE,CAAP,EAA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n\t'use strict';\n\tlet $main, $setupForm;\n\n\tconst checkForm = function checkForm( $form ) {\n\t\tconst $emails = $form.find( 'input[type=\"email\"]' );\n\t\tlet valid = true;\n\n\t\t$emails.each( function() {\n\t\t\tconst $this = $( this );\n\t\t\t$this.css( 'border-color', '' );\n\n\t\t\tswitch ( $this.attr( 'name' ) ) {\n\t\t\tcase 'settings[paypal][paypal_email]':\n\t\t\tcase 'settings[paypal][paypal_sandbox_email]':\n\t\t\t\tif ( ! $this.closest( 'tr' ).prev().find( 'input[type=\"checkbox\"]' ).is( ':checked' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( ! isEmail( this.value ) ) {\n\t\t\t\tvalid = false;\n\t\t\t\t$this.css( 'border-color', '#FF0000' );\n\t\t\t}\n\t\t} );\n\n\t\treturn valid;\n\t};\n\n\tconst blockContent = function blockContent( block ) {\n\t\t$main.toggleClass( 'loading', block === undefined ? true : block );\n\t};\n\n\tconst getFormData = function getFormData( more ) {\n\t\t$setupForm = $( '#learn-press-setup-form' );\n\t\tconst data = $setupForm.serializeJSON();\n\n\t\treturn $.extend( data, more || {} );\n\t};\n\n\tconst replaceMainContent = function replaceMainContent( newContent ) {\n\t\tconst $newContent = $( newContent );\n\t\t$main.replaceWith( $newContent );\n\t\t$main = $newContent;\n\t};\n\n\t/*const navPages = function navPages( e ) {\n\t\te.preventDefault();\n\n\t\tif ( ! checkForm( $setupForm ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst loadUrl = $( this ).attr( 'href' );\n\n\t\t$main.addClass( 'loading' );\n\t\t$.post( {\n\t\t\turl: loadUrl,\n\t\t\tdata: getFormData(),\n\t\t\tsuccess( res ) {\n\t\t\t\tconst $html = $( res );\n\t\t\t\treplaceMainContent( $html.contents().filter( '#main' ) );\n\n\t\t\t\tLP.setUrl( loadUrl );\n\n\t\t\t\t$( '.learn-press-dropdown-pages' ).LP( 'DropdownPages' );\n\t\t\t\t$( '.learn-press-tip' ).LP( 'QuickTip' );\n\t\t\t\t$main.removeClass( 'loading' );\n\t\t\t},\n\t\t} );\n\t};*/\n\n\tconst updateCurrency = function updateCurrency() {\n\t\tconst m = $( this ).children( ':selected' ).html().match( /\\((.*)\\)/ ),\n\t\t\tsymbol = m ? m[ 1 ] : '';\n\t\t$( '#currency-pos' ).children().each( function() {\n\t\t\tconst $option = $( this );\n\t\t\tlet text = $option.html();\n\n\t\t\tswitch ( $option.val() ) {\n\t\t\tcase 'left':\n\t\t\t\ttext = text.replace( /\\( (.*)69/, '( ' + symbol + '69' );\n\t\t\t\tbreak;\n\t\t\tcase 'right':\n\t\t\t\ttext = text.replace( /9([^0-9]*) \\)/, '9' + symbol + ' )' );\n\t\t\t\tbreak;\n\t\t\tcase 'left_with_space':\n\t\t\t\ttext = text.replace( /\\( (.*) 6/, '( ' + symbol + ' 6' );\n\t\t\t\tbreak;\n\t\t\tcase 'right_with_space':\n\t\t\t\ttext = text.replace( /9 (.*) \\)/, '9 ' + symbol + ' )' );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$option.html( text );\n\t\t} );\n\t};\n\n\tconst updatePrice = function updatePrice() {\n\t\t$.post( {\n\t\t\turl: '',\n\t\t\tdataType: 'html',\n\t\t\tdata: getFormData( {\n\t\t\t\t'lp-ajax': 'get-price-format',\n\t\t\t} ),\n\t\t\tsuccess( res ) {\n\t\t\t\t$( '#preview-price' ).html( res );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst createPages = function createPages( e ) {\n\t\te.preventDefault();\n\t\tblockContent();\n\n\t\t$.post( {\n\t\t\turl: $( this ).attr( 'href' ),\n\t\t\tdataType: 'html',\n\t\t\tdata: getFormData( {\n\t\t\t\t'lp-ajax': 'setup-create-pages',\n\t\t\t} ),\n\t\t\tsuccess( res ) {\n\t\t\t\treplaceMainContent( $( res ).contents().filter( '#main' ) );\n\t\t\t\t$( '.learn-press-dropdown-pages' ).LP( 'DropdownPages' );\n\t\t\t\tblockContent( false );\n\t\t\t},\n\t\t} );\n\t};\n\n\tfunction isEmail( email ) {\n\t\tconst re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\t\treturn re.test( email );\n\t}\n\n\t$( function() {\n\t\t$main = $( '#main' );\n\t\t$setupForm = $( '#learn-press-setup-form' );\n\t\t$( '.learn-press-select2' ).select2();\n\n\t\t$( document ).\n\t\t\t// on( 'click', '.buttons .button', navPages ).\n\t\t\ton( 'change', '#currency', updateCurrency ).\n\t\t\ton( 'change', 'input, select', updatePrice ).\n\t\t\ton( 'click', '#create-pages', createPages );\n\t} );\n}( jQuery ) );\n"],"names":["$","$main","$setupForm","checkForm","$form","$emails","find","valid","each","$this","css","attr","closest","prev","is","isEmail","value","blockContent","block","toggleClass","undefined","getFormData","more","data","serializeJSON","extend","replaceMainContent","newContent","$newContent","replaceWith","updateCurrency","m","children","html","match","symbol","$option","text","val","replace","updatePrice","post","url","dataType","success","res","createPages","e","preventDefault","contents","filter","LP","email","re","test","select2","document","on","jQuery"],"sourceRoot":""}
assets/js/dist/admin/pages/setup.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'd3c4b0e68d7d46a239f2');
assets/js/dist/admin/pages/statistic.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '00b01432cdb399eccf00');
assets/js/dist/admin/pages/statistic.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/statistic.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAc;AACfA,EAAAA,CAAC,CAACC,EAAF,CAAKC,aAAL,GAAqB,UAAUC,IAAV,EAAgBC,MAAhB,EA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AE,CAAF,CAAP,CAAaG,KAAvB,CAAtC,EAAuE;AACtE,iBAAO,IAAP;AACA;AACD,OAJD;;AAKAxB,MAAAA,QAAQ,CAACyB,MAAT,CAAiB,iCAAjB,EAAqDnB,IAArD,CAA2D,UAA3D,EAAuEe,OAAO,CAACI,MAAR,CAAgB,YAAW;AACjG,eAAO,KAAKD,KAAL,IAAc,EAArB;AACA,OAFsE,EAEnEE,GAFmE,GAE7D3B,MAF6D,IAEnD,CAAEuB,WAAW,EAFjC;AAGA,KATa,CAAd;AAUA,GA1ID;;AA2IAvC,EAAAA,CAAC,CAAE,YAAW;AACb,QAAK,OAAOA,CAAC,CAACC,EAAF,CAAK8D,UAAZ,IAA0B,WAA/B,EAA6C;AAC5C/D,MAAAA,CAAC,CAAE,cAAF,CAAD,CAAoB+D,UAApB,CAAgC;AAC/BC,QAAAA,UAAU,EAAE;AADmB,OAAhC;AAGA;;AACDhE,IAAAA,CAAC,CAAE,8BAAF,CAAD,CAAoCc,kBAApC;AACAd,IAAAA,CAAC,CAAE,gCAAF,CAAD,CAAsC4C,oBAAtC;AACA5C,IAAAA,CAAC,CAAE,+BAAF,CAAD,CAAqC6C,mBAArC;AACA,GATA,CAAD;AAUA;AAEA,CAhRC,EAgRCoB,MAhRD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/statistic.js"],"sourcesContent":["( function( $ ) {\n\t$.fn.LP_Chart_Line = function( data, config ) {\n\t\treturn $.each( this, function() {\n\t\t\tconst $elem = $( this ),\n\t\t\t\t$canvas = $( '<canvas />' );\n\t\t\t$elem.html( '' );\n\t\t\t$canvas.appendTo( $elem );\n\t\t\tvar lineChart = new Chart($canvas,{\n\t\t\t\ttype: 'line',\n\t\t\t\tdata: data,\n\t\t\t\toptions: config\n\t\t\t})\n\t\t} );\n\t\t//\n\t};\n\n\t$.fn.LP_Statistic_Users = function() {\n\t\tif ( parseInt( $( this ).length ) === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\treturn $.each( this, function() {\n\t\t\tconst $buttons = $( '.chart-buttons button' ).on( 'click', function() {\n\t\t\t\t\tconst $button = $( this ),\n\t\t\t\t\t\ttype = $button.data( 'type' );\n\t\t\t\t\tlet from = '',\n\t\t\t\t\t\tto = '';\n\t\t\t\t\t$buttons.not( this ).not( '[data-type=\"user-custom-time\"]' ).prop( 'disabled', false );\n\t\t\t\t\tif ( type == 'user-custom-time' ) {\n\t\t\t\t\t\tfrom = $( '#user-custom-time input[name=\"from\"]' ).val();\n\t\t\t\t\t\tto = $( '#user-custom-time input[name=\"to\"]' ).val();\n\n\t\t\t\t\t\tif ( from == '' || to == '' ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$button.prop( 'disabled', true );\n\t\t\t\t\t}\n\n\t\t\t\t\tconst $container = $( '#learn-press-chart' );\n\t\t\t\t\t$container.addClass( 'loading' );\n\t\t\t\t\t$.ajax( {\n\t\t\t\t\t\turl: 'admin-ajax.php',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\taction: 'learnpress_load_chart',\n\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\trange: [ from, to ],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdataType: 'text',\n\t\t\t\t\t\tsuccess( response ) {\n\t\t\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\t\t\t$container.LP_Chart_Line( response, LP_Chart_Config );\n\t\t\t\t\t\t\t$container.removeClass( 'loading' );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\treturn false;\n\t\t\t\t} ),\n\t\t\t\t$inputs = $( '.chart-buttons #user-custom-time input[type=\"text\"]' ).on( 'change', function() {\n\t\t\t\t\tconst _valid_date = function() {\n\t\t\t\t\t\tif ( new Date( $inputs[ 0 ].value ) < new Date( $inputs[ 1 ].value ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t$buttons.filter( '[data-type=\"user-custom-time\"]' ).prop( 'disabled', $inputs.filter( function() {\n\t\t\t\t\t\treturn this.value == '';\n\t\t\t\t\t} ).get().length || ! _valid_date() );\n\t\t\t\t} );\n\t\t} );\n\t};\n\n\t$.fn.LP_Statistic_Courses = function() {\n\t\tif ( parseInt( $( this ).length ) === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\treturn $.each( this, function() {\n\t\t\tvar $buttons = $( '.chart-buttons button' ).on( 'click', function() {\n\t\t\t\t\tlet $button = $( this ),\n\t\t\t\t\t\ttype = $button.data( 'type' ),\n\t\t\t\t\t\tfrom = '',\n\t\t\t\t\t\tto = '',\n\t\t\t\t\t\t$container = $( '#learn-press-chart' );\n\t\t\t\t\t$buttons.not( this ).not( '[data-type=\"course-custom-time\"]' ).prop( 'disabled', false );\n\t\t\t\t\tif ( type == 'course-custom-time' ) {\n\t\t\t\t\t\tfrom = $( '#course-custom-time input[name=\"from\"]' ).val();\n\t\t\t\t\t\tto = $( '#course-custom-time input[name=\"to\"]' ).val();\n\n\t\t\t\t\t\tif ( from == '' || to == '' ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$button.prop( 'disabled', true );\n\t\t\t\t\t}\n\t\t\t\t\t$container.addClass( 'loading' );\n\t\t\t\t\t$.ajax( {\n\t\t\t\t\t\turl: 'admin-ajax.php',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\taction: 'learnpress_load_chart',\n\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\trange: [ from, to ],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdataType: 'text',\n\t\t\t\t\t\tsuccess( response ) {\n\t\t\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\t\t\t$container.LP_Chart_Line( response, LP_Chart_Config );\n\t\t\t\t\t\t\t$container.removeClass( 'loading' );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\treturn false;\n\t\t\t\t} ),\n\t\t\t\t$inputs = $( '.chart-buttons #course-custom-time input[type=\"text\"]' ).on( 'change', function() {\n\t\t\t\t\tconst _valid_date = function() {\n\t\t\t\t\t\tif ( new Date( $inputs[ 0 ].value ) < new Date( $inputs[ 1 ].value ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t$buttons.filter( '[data-type=\"course-custom-time\"]' ).prop( 'disabled', $inputs.filter( function() {\n\t\t\t\t\t\treturn this.value == '';\n\t\t\t\t\t} ).get().length || ! _valid_date() );\n\t\t\t\t} );\n\t\t} );\n\t};\n\n\t$.fn.LP_Statistic_Orders = function() {\n\t\tif ( parseInt( $( this ).length ) === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\t$( '.panel_report_option' ).hide();\n\t\t$( '#panel_report_sales_by_' + $( '#report_sales_by' ).val() ).show();\n\t\t$( '#report_sales_by' ).on( 'change', function() {\n\t\t\t$( '.panel_report_option' ).hide();\n\t\t\t$( '#panel_report_sales_by_' + $( this ).val() ).show();\n\t\t\tif ( 'date' == $( this ).val() ) {\n\t\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * Upgrade Chart for Order Statistics\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tvar LP_Statistic_Orders_Upgrade_Chart = function() {\n\t\t\tlet type = '',\n\t\t\t\tfrom = '',\n\t\t\t\tto = '',\n\t\t\t\treport_sales_by = 'date',\n\t\t\t\tcat_id = 0,\n\t\t\t\tcourse_id = 0;\n\t\t\treport_sales_by = $( '#report_sales_by' ).val();\n\t\t\t$container = $( '#learn-press-chart' );\n\t\t\t$container.addClass( 'loading' );\n\t\t\t// get type\n\t\t\tconst $buttons = $( '.chart-buttons button:disabled' ).not( '[data-type=\"order-custom-time\"]' );\n\t\t\tif ( parseInt( $buttons.length ) > 0 ) {\n\t\t\t\ttype\t= $( $buttons[ 0 ] ).data( 'type' );\n\t\t\t} else {\n\t\t\t\ttype\t= 'order-custom-time';\n\t\t\t\tfrom\t= $( '#order-custom-time input[name=\"from\"]' ).val();\n\t\t\t\tto\t\t= $( '#order-custom-time input[name=\"to\"]' ).val();\n\t\t\t\tif ( from == '' || to == '' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( 'course' === report_sales_by ) {\n\t\t\t\tcourse_id = $( '#report-by-course-id' ).val();\n\t\t\t} else if ( 'category' === report_sales_by ) {\n\t\t\t\tcat_id = $( '#report-by-course-category-id' ).val();\n\t\t\t}\n\n\t\t\t$.ajax( {\n\t\t\t\turl: 'admin-ajax.php',\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'learnpress_load_chart',\n\t\t\t\t\ttype,\n\t\t\t\t\trange: [ from, to ],\n\t\t\t\t\treport_sales_by,\n\t\t\t\t\tcourse_id,\n\t\t\t\t\tcat_id,\n\t\t\t\t},\n\t\t\t\tdataType: 'text',\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\t$container.LP_Chart_Line( response, LP_Chart_Config );\n\t\t\t\t\t$container.removeClass( 'loading' );\n\t\t\t\t},\n\t\t\t} );\n\t\t};\n\n\t\t$( '#report-by-course-id' ).select2( {\n\t\t\tplaceholder: 'Select a course',\n\t\t\tminimumInputLength: 1,\n\t\t\tajax: {\n\t\t\t\turl: ajaxurl + '?action=learnpress_search_course',\n\t\t\t\tdataType: 'json',\n\t\t\t\tquietMillis: 250,\n\t\t\t\tdata( term, page ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tq: term, // search term\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tresults( data, page ) {\n\t\t\t\t\treturn { results: data.items };\n\t\t\t\t},\n\t\t\t\tcache: true,\n\t\t\t},\n\t\t} );\n\n\t\t$( '#report-by-course-id' ).on( 'change', function() {\n\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t} );\n\n\t\t$( '#report-by-course-category-id' ).select2( {\n\t\t\tplaceholder: 'Select a course',\n\t\t\tminimumInputLength: 1,\n\t\t\tajax: {\n\t\t\t\turl: ajaxurl + '?action=learnpress_search_course_category',\n\t\t\t\tdataType: 'json',\n\t\t\t\tquietMillis: 250,\n\t\t\t\tdata( term, page ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tq: term, // search term\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tresults( data, page ) {\n\t\t\t\t\treturn { results: data.items };\n\t\t\t\t},\n\t\t\t\tcache: true,\n\t\t\t},\n\t\t} );\n\n\t\t$( '#report-by-course-category-id' ).on( 'change', function() {\n\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t} );\n\n\t\tvar $buttons = $( '.chart-buttons button' ).on( 'click', function() {\n\t\t\tconst $button = $( this ),\n\t\t\t\ttype = $button.data( 'type' ),\n\t\t\t\tfrom = '',\n\t\t\t\tto = '',\n\t\t\t\t$container = $( '#learn-press-chart' );\n\t\t\t$buttons.not( this ).not( '[data-type=\"order-custom-time\"]' ).prop( 'disabled', false );\n\t\t\tif ( type !== 'order-custom-time' ) {\n\t\t\t\t$button.prop( 'disabled', true );\n\t\t\t\t$( '#order-custom-time input[name=\"from\"]' ).val( '' );\n\t\t\t\t$( '#order-custom-time input[name=\"to\"]' ).val( '' );\n\t\t\t}\n\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t\treturn false;\n\t\t} );\n\n\t\tvar $inputs = $( '.chart-buttons #order-custom-time input[type=\"text\"]' ).on( 'change', function() {\n\t\t\tconst _valid_date = function() {\n\t\t\t\tif ( new Date( $inputs[ 0 ].value ) < new Date( $inputs[ 1 ].value ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t\t$buttons.filter( '[data-type=\"order-custom-time\"]' ).prop( 'disabled', $inputs.filter( function() {\n\t\t\t\treturn this.value == '';\n\t\t\t} ).get().length || ! _valid_date() );\n\t\t} );\n\t};\n\t$( function() {\n\t\tif ( typeof $.fn.datepicker != 'undefined' ) {\n\t\t\t$( '.date-picker' ).datepicker( {\n\t\t\t\tdateFormat: 'yy/mm/dd',\n\t\t\t} );\n\t\t}\n\t\t$( '.learn-press-statistic-users' ).LP_Statistic_Users();\n\t\t$( '.learn-press-statistic-courses' ).LP_Statistic_Courses();\n\t\t$( '.learn-press-statistic-orders' ).LP_Statistic_Orders();\n\t} );\n\treturn;\n\n}( jQuery ) );\n\n\n"],"names":["$","fn","LP_Chart_Line","data","config","each","$elem","$canvas","html","appendTo","lineChart","Chart","type","options","LP_Statistic_Users","parseInt","length","$buttons","on","$button","from","to","not","prop","val","$container","addClass","ajax","url","action","range","dataType","success","response","LP","parseJSON","LP_Chart_Config","removeClass","$inputs","_valid_date","Date","value","filter","get","LP_Statistic_Courses","LP_Statistic_Orders","hide","show","LP_Statistic_Orders_Upgrade_Chart","report_sales_by","cat_id","course_id","select2","placeholder","minimumInputLength","ajaxurl","quietMillis","term","page","q","results","items","cache","datepicker","dateFormat","jQuery"],"sourceRoot":""}
assets/js/dist/admin/pages/statistic.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '29ac52b6368a2a3f9b35');
assets/js/dist/admin/pages/sync-data.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '2e728a52bec08b0ea710');
assets/js/dist/admin/pages/sync-data.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/sync-data.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAc;AACf,QAAMC,SAAS,GAAG;AACjBC,IAAAA,EAAE,EAAE,WADa;AAEjBC,IAAAA,OAAO,EAAE,KAFQ;AAGjBC,IAAAA,KAAK,EAAE,KAHU;AAIjBC,IAAAA,SAAS,EAAE,KAJM;AAKjBC,IAAAA,QAAQ,EAAE,IALO;AAMjBC,IAAAA,cAAc,EAAE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CAAD,CAA4BkE,IAA5B,CAAkC,kBAAkBxD,IAAlB,GAAyB,IAA3D,CAAP;AACA;;AAED2B,IAAAA,YAAY,CAACG,KAAb,CAAoB;AACnBC,MAAAA,MAAM,GAAG;AACRzC,QAAAA,CAAC,CAAE,sBAAF,CAAD,CAA4BwE,QAA5B,GAAuCC,WAAvC,CAAoD,gBAApD;AACAzE,QAAAA,CAAC,CAAE,mBAAF,CAAD,CAAyBoE,IAAzB,CAA+B,UAA/B,EAA2C,IAA3C;AACA,OAJkB;;AAKnB1B,MAAAA,OAAO,CAAEO,KAAF,EAAU;AAChBsB,QAAAA,QAAQ,CAAEtB,KAAK,CAAC/C,EAAR,CAAR,CAAqBwE,OAArB,CAA8B,IAA9B,EAAqCC,QAArC,CAA+C,SAA/C;AACA,OAPkB;;AAQnBhC,MAAAA,WAAW,CAAEM,KAAF,EAAU;AACpBsB,QAAAA,QAAQ,CAAEtB,KAAK,CAAC/C,EAAR,CAAR,CAAqBwE,OAArB,CAA8B,IAA9B,EAAqCD,WAArC,CAAkD,SAAlD,EAA8DE,QAA9D,CAAwE,QAAxE;AACA,OAVkB;;AAWnB/B,MAAAA,cAAc,GAAG;AAChB5C,QAAAA,CAAC,CAAE,sBAAF,CAAD,CAA4BwE,QAA5B,GAAuCC,WAAvC,CAAoD,gBAApD;AACAzE,QAAAA,CAAC,CAAE,mBAAF,CAAD,CAAyBoE,IAAzB,CAA+B,UAA/B,EAA2C,KAA3C;AACA;;AAdkB,KAApB;AAgBA,GApCD;AAqCA,CArQC,EAqQCQ,MArQD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/sync-data.js"],"sourcesContent":["( function( $ ) {\n\tconst Sync_Base = {\n\t\tid: 'sync-base',\n\t\tsyncing: false,\n\t\titems: false,\n\t\tcompleted: false,\n\t\tcallback: null,\n\t\tmethodGetItems: '',\n\t\titemsKey: '',\n\t\tchunkSize: 50,\n\t\tsync( callback ) {\n\t\t\tif ( this.syncing ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.callback = callback;\n\n\t\t\tif ( this.items === false ) {\n\t\t\t\tthis.get_items();\n\t\t\t} else if ( ! this.dispatch() ) {\n\t\t\t\tthis.completed = true;\n\t\t\t\tthis.callToCallback();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.syncing = true;\n\t\t},\n\t\tinit() {\n\t\t\tthis.syncing = false;\n\t\t\tthis.items = false;\n\t\t\tthis.completed = false;\n\t\t},\n\t\tis_completed() {\n\t\t\treturn this.completed;\n\t\t},\n\t\tdispatch() {\n\t\t\tconst that = this,\n\t\t\t\titems = this.items ? this.items.splice( 0, this.chunkSize ) : false;\n\t\t\tif ( ! items || items.length === 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': this.id,\n\t\t\t\t\tsync: items,\n\t\t\t\t},\n\t\t\t\tmethod: 'post',\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\tthat.syncing = false;\n\t\t\t\t\tif ( response.result !== 'success' ) {\n\t\t\t\t\t\tthat.completed = true;\n\t\t\t\t\t}\n\t\t\t\t\tthat.callToCallback();\n\t\t\t\t\tif ( that.is_completed() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthat.sync( that.callback );\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\treturn true;\n\t\t},\n\t\tcallToCallback() {\n\t\t\tthis.callback && this.callback.call( this );\n\t\t},\n\t\tget_items() {\n\t\t\tconst that = this;\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': this.id,\n\t\t\t\t\tsync: this.methodGetItems,\n\t\t\t\t},\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tthat.syncing = false;\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\tif ( response[ that.itemsKey ] ) {\n\t\t\t\t\t\tthat.items = response[ that.itemsKey ];\n\t\t\t\t\t\tthat.sync( that.callback );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthat.completed = true;\n\t\t\t\t\t\tthat.items = [];\n\t\t\t\t\t\tthat.callToCallback();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\t};\n\n\tconst Sync_Course_Orders = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-course-orders',\n\t\tmethodGetItems: 'get-courses',\n\t\titemsKey: 'courses',\n\t} );\n\n\tconst Sync_User_Courses = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-user-courses',\n\t\tmethodGetItems: 'get-users',\n\t\titemsKey: 'users',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_User_Orders = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-user-orders',\n\t\tmethodGetItems: 'get-users',\n\t\titemsKey: 'users',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_Course_Final_Quiz = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-course-final-quiz',\n\t\tmethodGetItems: 'get-courses',\n\t\titemsKey: 'courses',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_Remove_Older_Data = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-remove-older-data',\n\t\tmethodGetItems: 'remove-older-data',\n\t\titemsKey: '_nothing_here',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_Calculate_Course_Results = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-calculate-course-results',\n\t\tmethodGetItems: 'get-users',\n\t\titemsKey: 'users',\n\t\tchunkSize: 1,\n\t} );\n\n\twindow.LP_Sync_Data = {\n\t\tsyncs: [],\n\t\tsyncing: 0,\n\t\toptions: {},\n\t\tstart( options ) {\n\t\t\tthis.syncs = [];\n\t\t\tthis.options = $.extend( {\n\t\t\t\tonInit() {\n\t\t\t\t},\n\t\t\t\tonStart() {\n\n\t\t\t\t},\n\t\t\t\tonCompleted() {\n\n\t\t\t\t},\n\t\t\t\tonCompletedAll() {\n\n\t\t\t\t},\n\t\t\t}, options || {} );\n\n\t\t\tif ( ! this.get_syncs() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.reset();\n\t\t\tthis.options.onInit.call( this );\n\t\t\tvar that = this,\n\t\t\t\tsyncing = 0,\n\t\t\t\ttotalSyncs = this.syncs.length,\n\t\t\t\tsyncCallback = function( $sync ) {\n\t\t\t\t\tif ( $sync.is_completed() ) {\n\t\t\t\t\t\tsyncing++;\n\t\t\t\t\t\tthat.options.onCompleted.call( that, $sync );\n\t\t\t\t\t\tif ( syncing >= totalSyncs ) {\n\t\t\t\t\t\t\tthat.options.onCompletedAll.call( that );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthat.sync( syncing, syncCallback );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tthis.sync( syncing, syncCallback );\n\t\t},\n\t\treset() {\n\t\t\tfor ( const sync in this.syncs ) {\n\t\t\t\ttry {\n\t\t\t\t\tthis[ this.syncs[ sync ] ].init();\n\t\t\t\t} catch ( e ) {\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsync( sync, callback ) {\n\t\t\tconst that = this,\n\t\t\t\t$sync = this[ this.syncs[ sync ] ];\n\t\t\tthat.options.onStart.call( that, $sync );\n\t\t\t$sync.sync( function() {\n\t\t\t\tcallback.call( that, $sync );\n\t\t\t} );\n\t\t},\n\t\tget_syncs() {\n\t\t\tconst syncs = $( 'input[name^=\"lp-repair\"]:checked' ).serializeJSON()[ 'lp-repair' ];\n\t\t\tif ( ! syncs ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor ( let sync in syncs ) {\n\t\t\t\tif ( syncs[ sync ] !== 'yes' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tsync = sync.replace( /[-]+/g, '_' );\n\n\t\t\t\tif ( ! this[ sync ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.syncs.push( sync );\n\t\t\t}\n\n\t\t\treturn this.syncs;\n\t\t},\n\t\tget_sync( id ) {\n\t\t\tid = id.replace( /[-]+/g, '_' );\n\t\t\treturn this[ id ];\n\t\t},\n\t\tsync_course_orders: Sync_Course_Orders,\n\t\tsync_user_orders: Sync_User_Orders,\n\t\tsync_user_courses: Sync_User_Courses,\n\t\tsync_course_final_quiz: Sync_Course_Final_Quiz,\n\t\tsync_remove_older_data: Sync_Remove_Older_Data,\n\t\tsync_calculate_course_results: Sync_Calculate_Course_Results,\n\t};\n\n\t$( document ).ready( function() {\n\t\tfunction initSyncs() {\n\t\t\tconst $chkAll = $( '#learn-press-check-all-syncs' ),\n\t\t\t\t$chks = $( '#learn-press-syncs' ).find( '[name^=\"lp-repair\"]' );\n\n\t\t\t$chkAll.on( 'click', function() {\n\t\t\t\t$chks.prop( 'checked', this.checked );\n\t\t\t} );\n\n\t\t\t$chks.on( 'click', function() {\n\t\t\t\t$chkAll.prop( 'checked', $chks.filter( ':checked' ).length === $chks.length );\n\t\t\t} );\n\t\t}\n\n\t\tinitSyncs();\n\t} ).on( 'click', '.lp-button-repair', function() {\n\t\tfunction getInput( sync ) {\n\t\t\treturn $( 'ul#learn-press-syncs' ).find( 'input[name*=\"' + sync + '\"]' );\n\t\t}\n\n\t\tLP_Sync_Data.start( {\n\t\t\tonInit() {\n\t\t\t\t$( 'ul#learn-press-syncs' ).children().removeClass( 'syncing synced' );\n\t\t\t\t$( '.lp-button-repair' ).prop( 'disabled', true );\n\t\t\t},\n\t\t\tonStart( $sync ) {\n\t\t\t\tgetInput( $sync.id ).closest( 'li' ).addClass( 'syncing' );\n\t\t\t},\n\t\t\tonCompleted( $sync ) {\n\t\t\t\tgetInput( $sync.id ).closest( 'li' ).removeClass( 'syncing' ).addClass( 'synced' );\n\t\t\t},\n\t\t\tonCompletedAll() {\n\t\t\t\t$( 'ul#learn-press-syncs' ).children().removeClass( 'syncing synced' );\n\t\t\t\t$( '.lp-button-repair' ).prop( 'disabled', false );\n\t\t\t},\n\t\t} );\n\t} );\n}( jQuery ) );\n"],"names":["$","Sync_Base","id","syncing","items","completed","callback","methodGetItems","itemsKey","chunkSize","sync","get_items","dispatch","callToCallback","init","is_completed","that","splice","length","ajax","url","data","method","success","response","LP","parseJSON","result","call","Sync_Course_Orders","extend","Sync_User_Courses","Sync_User_Orders","Sync_Course_Final_Quiz","Sync_Remove_Older_Data","Sync_Calculate_Course_Results","window","LP_Sync_Data","syncs","options","start","onInit","onStart","onCompleted","onCompletedAll","get_syncs","reset","totalSyncs","syncCallback","$sync","e","serializeJSON","replace","push","get_sync","sync_course_orders","sync_user_orders","sync_user_courses","sync_course_final_quiz","sync_remove_older_data","sync_calculate_course_results","document","ready","initSyncs","$chkAll","$chks","find","on","prop","checked","filter","getInput","children","removeClass","closest","addClass","jQuery"],"sourceRoot":""}
assets/js/dist/admin/pages/sync-data.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '403b09fb3a035e950b8f');
assets/js/dist/admin/pages/themes-addons.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '1824c46120753232bd00');
assets/js/dist/admin/pages/themes-addons.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/themes-addons.js","mappings":";;;;;;;;;;;AAAE,WAAUA,CAAV,EAAc;AACf,MAAIC,KAAK,GAAG,IAAZ;AAAA,MACCC,MAAM,GAAG,IADV;AAAA,MAECC,WAAW,GAAG,IAFf;;AAIA,QAAMC,QAAQ,GAAG,UAAUC,OAAV,EAAoB;AACpC,QAAK,CAAEF,WAAP,EAAqB;AACpBA,MAAAA,WAAW,GAAGD,MAAM,CAACI,KAAP,EAAd;AACA;;AACD,UAAMC,QAAQ,GAAGF,OAAO,CAACG,WAAR,GAAsBC,KAAtB,CA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AAW,CAAC+B,EAAZ,CAAgBJ,CAAhB,CAAF,EAAuBC,KAAvB,CADpB;AAAA,YAECI,KAAK,GAAGJ,KAAK,CAACK,QAAN,GAAiBvB,MAF1B;AAIAkB,MAAAA,KAAK,CAACM,IAAN,CAAY,IAAZ,EAAmBpB,IAAnB,CAAyB,MAAzB,EAAkCe,IAAlC,CAAwCG,KAAxC;AACA,KAND;AAOA,GAlCD;;AAoCAnC,EAAAA,CAAC,CAAEsC,QAAF,CAAD,CAAcC,EAAd,CAAkB,OAAlB,EAA2B,kBAA3B,EAA+C,UAAUC,CAAV,EAAc;AAC5DvC,IAAAA,KAAK,IAAIwC,YAAY,CAAExC,KAAF,CAArB;AACAA,IAAAA,KAAK,GAAGyC,UAAU,CAAEtC,QAAF,EAAY,GAAZ,EAAiBoC,CAAC,CAACG,MAAF,CAASC,KAA1B,CAAlB;AACA,GAHD;AAKA5C,EAAAA,CAAC,CAAE,YAAW;AACbE,IAAAA,MAAM,GAAGF,CAAC,CAAE,gBAAF,CAAV;AACA,GAFA,CAAD;AAGA,CAjDC,EAiDC6C,MAjDD,CAAF;;AAmDA,MAAMC,kBAAkB,GAAG,MAAM,CAEhC,CAFD;;AAIA,+DAAeA,kBAAf;;;;;;UCvDA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNA;AAEAR,QAAQ,CAACS,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUC,KAAV,EAAkB;AAChEF,EAAAA,2EAAkB;AAClB,CAFD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/addons/search-lp-addons-themes.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/pages/themes-addons.js"],"sourcesContent":["( function( $ ) {\n\tlet timer = null,\n\t\t$wraps = null,\n\t\t$cloneWraps = null;\n\n\tconst onSearch = function( keyword ) {\n\t\tif ( ! $cloneWraps ) {\n\t\t\t$cloneWraps = $wraps.clone();\n\t\t}\n\t\tconst keywords = keyword.toLowerCase().split( /\\s+/ ).filter( function( a, b ) {\n\t\t\treturn a.length >= 3;\n\t\t} );\n\t\tconst foundItems = function( $w1, $w2 ) {\n\t\t\treturn $w1.find( '.plugin-card' ).each( function() {\n\t\t\t\tconst $item = $( this ),\n\t\t\t\t\titemText = $item.find( '.item-title' ).text().toLowerCase(),\n\t\t\t\t\titemDesc = $item.find( '.column-description, .theme-description' ).text();\n\t\t\t\tconst found = function() {\n\t\t\t\t\tconst reg = new RegExp( keywords.join( '|' ), 'ig' );\n\t\t\t\t\treturn itemText.match( reg ) || itemDesc.match( reg );\n\t\t\t\t};\n\t\t\t\tif ( keywords.length ) {\n\t\t\t\t\tif ( found() ) {\n\t\t\t\t\t\tconst $clone = $item.clone();\n\t\t\t\t\t\t$w2.append( $clone );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$w2.append( $item.clone() );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\t$wraps.each( function( i ) {\n\t\t\tconst $this = $( this ).html( '' ),\n\t\t\t\t$items = foundItems( $cloneWraps.eq( i ), $this ),\n\t\t\t\tcount = $this.children().length;\n\n\t\t\t$this.prev( 'h2' ).find( 'span' ).html( count );\n\t\t} );\n\t};\n\n\t$( document ).on( 'keyup', '.lp-search-addon', function( e ) {\n\t\ttimer && clearTimeout( timer );\n\t\ttimer = setTimeout( onSearch, 300, e.target.value );\n\t} );\n\n\t$( function() {\n\t\t$wraps = $( '.addons-browse' );\n\t} );\n}( jQuery ) );\n\nconst searchThemesAddons = () => {\n\n};\n\nexport default searchThemesAddons;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import searchThemesAddons from './addons/search-lp-addons-themes';\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\tsearchThemesAddons();\n} );\n"],"names":["$","timer","$wraps","$cloneWraps","onSearch","keyword","clone","keywords","toLowerCase","split","filter","a","b","length","foundItems","$w1","$w2","find","each","$item","itemText","text","itemDesc","found","reg","RegExp","join","match","$clone","append","i","$this","html","$items","eq","count","children","prev","document","on","e","clearTimeout","setTimeout","target","value","jQuery","searchThemesAddons","addEventListener","event"],"sourceRoot":""}
assets/js/dist/admin/pages/themes-addons.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'ea5d0c3c38755b706e56');
assets/js/dist/admin/pages/tools.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-element'), 'version' => 'fefd623f7ff09486f556');
assets/js/dist/admin/pages/tools.js CHANGED
@@ -469,6 +469,11 @@ const upgradeDB = () => {
469
 
470
  const scrollToStepCurrent = stepCurrent => {
471
  elItemStepCurrent = elGroupStep.find('input[value=' + stepCurrent + ']').closest('.lp-item-step');
 
 
 
 
 
472
  const offset = elItemStepCurrent.offset().top - _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.offset().top + _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.scrollTop();
473
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.stop().animate({
474
  scrollTop: offset
469
 
470
  const scrollToStepCurrent = stepCurrent => {
471
  elItemStepCurrent = elGroupStep.find('input[value=' + stepCurrent + ']').closest('.lp-item-step');
472
+
473
+ if (!elItemStepCurrent.length) {
474
+ return;
475
+ }
476
+
477
  const offset = elItemStepCurrent.offset().top - _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.offset().top + _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.scrollTop();
478
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.stop().animate({
479
  scrollTop: offset
assets/js/dist/admin/pages/tools.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/tools.js","mappings":";;;;;;;;;;;;;AAAA;AACA;;AAEA,MAAME,cAAc,GAAG,MAAM;AAC5B,QAAMC,gBAAgB,GAAGC,QAAQ,CAACC,aAAT,CAAwB,yBAAxB,CAAzB;;AAEA,MAAK,CAAEF,gBAAP,EAA0B;AACzB;AACA;;AAED,QAAMG,mBAAmB,GAAGH,gBAAgB,CAACE,aAAjB,CAAgC,kBAAhC,CAA5B;AACAC,EAAAA,mBAAmB,CAACC,gBAApB,CAAsC,OAAtC,EAA+C,UAAUC,CAAV,EAAc;AAC5DA,IAAAA,CAAC,CAACC,cAAF;AACA,UAAMC,aAAa,GAAGN,QAAQ,CAACC,aAAT,CAAwB,mBAAxB,CAAtB;AACA,UAAMM,cAAc,GAAGD,aAAa,CAACE,gBAAd,CAAgC,aAAhC,CAAvB;AACA,UAAMC,UAAU,GAAGC,KAAK,CAACC,SAAN,CAAgBC,KAAhB,CAAsBC,IAAtB,CAA4BN,cAA5B,EAA6CO,IAA7C,CAAqDC,CAAF,IAASA,CAAC,CAACC,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AAjD,EACEpF,EADF,CACM,OADN,EACe,+BADf,EACgD4F,qBADhD,EAEE5F,EAFF,CAEM,OAFN,EAEe,0BAFf,EAE2C8F,cAF3C,EAGE9F,EAHF,CAGM,OAHN,EAGe,iCAHf,EAGkD+F,eAHlD,EAIE/F,EAJF,CAIM,OAJN,EAIe,oCAJf,EAIqDiG,aAJrD;AAKA,GAXA,CAAD;AAYA,CArHC,EAqHCtI,MArHD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/clean_database.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/create_indexs.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/re-upgrade-db.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/upgrade.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/reset-data/course.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/reset-data/index.js","webpack://learnpress/./assets/src/apps/js/utils/handle-ajax-api.js","webpack://learnpress/./assets/src/apps/js/utils/lp-modal-overlay.js","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/pages/tools.js"],"sourcesContent":["import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst cleanDatabases = () => {\n\tconst elCleanDatabases = document.querySelector( '#lp-tool-clean-database' );\n\n\tif ( ! elCleanDatabases ) {\n\t\treturn;\n\t}\n\n\tconst elBtnCleanDatabases = elCleanDatabases.querySelector( '.lp-btn-clean-db' );\n\telBtnCleanDatabases.addEventListener( 'click', function( e ) {\n\t\te.preventDefault();\n\t\tconst elToolsSelect = document.querySelector( '#tools-select__id' );\n\t\tconst ElToolSelectLi = elToolsSelect.querySelectorAll( 'ul li input' );\n\t\tconst checkedOne = Array.prototype.slice.call( ElToolSelectLi ).some( ( x ) => x.checked );\n\t\tconst prepareMessage = elCleanDatabases.querySelector( '.tools-prepare__message' );\n\t\tif ( checkedOne == false ) {\n\t\t\tprepareMessage.style.display = 'block';\n\t\t\tprepareMessage.textContent = 'You must choose at least one table to take this action';\n\t\t\treturn;\n\t\t}\n\t\tprepareMessage.style.display = 'none';\n\n\t\tconst elLoading = elCleanDatabases.querySelector( '.wrapper-lp-loading' );\n\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlpModalOverlay.elLPOverlay.show();\n\t\tlpModalOverlay.setContentModal( elLoading.innerHTML );\n\t\tlpModalOverlay.setTitleModal( elCleanDatabases.querySelector( 'h2' ).textContent );\n\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'inline-block';\n\t\tlpModalOverlay.elBtnYes[ 0 ].textContent = 'Run';\n\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Close';\n\t\tconst listTables = new Array();\n\t\tconst ElToolSelectLiCheked = elToolsSelect.querySelectorAll( 'ul li input:checked' );\n\t\tElToolSelectLiCheked.forEach( ( e ) => {\n\t\t\tlistTables.push( e.value );\n\t\t} );\n\t\tconst tables = listTables[ 0 ];\n\t\tconst item = elLoading.querySelector( '.progressbar__item' );\n\n\t\tconst itemtotal = item.getAttribute( 'data-total' );\n\t\tconst modal = document.querySelector( '.lp-modal-body .main-content' );\n\t\tconst notice = modal.querySelector( '.lp-tool__message' );\n\t\tif ( itemtotal <= 0 ) {\n\t\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'none';\n\t\t\tnotice.textContent = ( 'There is no data that need to be repaired in the chosen tables' );\n\t\t\tnotice.style.display = 'block';\n\t\t\treturn;\n\t\t}\n\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t// warn user before doing\n\t\t\tconst r = confirm( 'The modified data is impossible to be restored. Please backup your website before doing this.' );\n\t\t\tif ( r == false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst modal = document.querySelector( '.lp-modal-body .main-content' );\n\t\t\tconst notice = modal.querySelector( '.lp-tool__message' );\n\t\t\tnotice.textContent = 'This action is in processing. Don\\'t close this page';\n\t\t\tnotice.style.display = 'block';\n\t\t\tconst url = '/lp/v1/admin/tools/clean-tables';\n\t\t\tconst params = { tables, itemtotal };\n\n\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'none';\n\t\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'none';\n\n\t\t\tconst functions = {\n\t\t\t\tsuccess: ( res ) => {\n\t\t\t\t\tconst { status, message, data: { processed, percent } } = res;\n\t\t\t\t\tconst modalItem = modal.querySelector( '.progressbar__item' );\n\t\t\t\t\tconst progressBarRows = modalItem.querySelector( '.progressbar__rows' );\n\t\t\t\t\tconst progressPercent = modalItem.querySelector( '.progressbar__percent' );\n\t\t\t\t\tconst progressValue = modalItem.querySelector( '.progressbar__value' );\n\n\t\t\t\t\tconsole.log( status );\n\t\t\t\t\tif ( 'success' === status ) {\n\t\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\t\thandleAjax( url, params, functions );\n\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t// update processed quantity\n\t\t\t\t\t\tprogressBarRows.textContent = processed + ' / ' + itemtotal;\n\t\t\t\t\t\t// update percent\n\t\t\t\t\t\tprogressPercent.textContent = '( ' + percent + '%' + ' )';\n\t\t\t\t\t\t// update percent width\n\t\t\t\t\t\tprogressValue.style.width = percent + '%';\n\t\t\t\t\t} else if ( 'finished' === status ) {\n\t\t\t\t\t\t// Re-update indexs\n\t\t\t\t\t\tprogressBarRows.textContent = itemtotal + ' / ' + itemtotal;\n\t\t\t\t\t\tprogressPercent.textContent = '( 100% )';\n\t\t\t\t\t\t// Update complete nofication\n\t\t\t\t\t\tconst modal = document.querySelector( '.lp-modal-body .main-content' );\n\t\t\t\t\t\tconst notice = modal.querySelector( '.lp-tool__message' );\n\t\t\t\t\t\tnotice.textContent = 'Process has been completed. Press click the finish button to close this popup';\n\t\t\t\t\t\tnotice.style.color = 'white';\n\t\t\t\t\t\tnotice.style.background = 'green';\n\t\t\t\t\t\tprogressValue.style.width = '100%';\n\t\t\t\t\t\t// Show finish button\n\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'inline-block';\n\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Finish';\n\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].addEventListener( 'click', function() {\n\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log( message );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: ( err ) => {\n\t\t\t\t\tconsole.log( err );\n\t\t\t\t},\n\t\t\t\tcompleted: () => {\n\n\t\t\t\t},\n\t\t\t};\n\t\t\thandleAjax( url, params, functions );\n\t\t};\n\t} );\n};\nexport default cleanDatabases;\n","import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst createIndexes = () => {\n\tconst elCreateIndexTables = document.querySelector( '#lp-tool-create-indexes-tables' );\n\n\tif ( ! elCreateIndexTables ) {\n\t\treturn;\n\t}\n\n\tconst elBtnCreateIndexes = elCreateIndexTables.querySelector( '.lp-btn-create-indexes' );\n\n\telBtnCreateIndexes.addEventListener( 'click', ( e ) => {\n\t\te.preventDefault();\n\t\tconst elLoading = elCreateIndexTables.querySelector( '.wrapper-lp-loading' );\n\n\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlpModalOverlay.elLPOverlay.show();\n\t\tlpModalOverlay.setContentModal( elLoading.innerHTML );\n\t\tlpModalOverlay.setTitleModal( elCreateIndexTables.querySelector( 'h2' ).textContent );\n\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'inline-block';\n\t\tlpModalOverlay.elBtnYes[ 0 ].textContent = 'Run';\n\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Close';\n\n\t\tconst url = '/lp/v1/admin/tools/list-tables-indexs';\n\t\tconst params = {};\n\t\tconst functions = {\n\t\t\tsuccess: ( res ) => {\n\t\t\t\tconst { status, message, data: { tables, table } } = res;\n\t\t\t\tconst elSteps = document.querySelector( '.example-lp-group-step' );\n\n\t\t\t\tlpModalOverlay.setContentModal( elSteps.innerHTML );\n\n\t\t\t\tconst elGroupStep = lpModalOverlay.elLPOverlay[ 0 ].querySelector( '.lp-group-step ' );\n\n\t\t\t\t// Show progress when upgrading.\n\t\t\t\tconst showProgress = ( stepCurrent, percent ) => {\n\t\t\t\t\tconst elItemStepCurrent = elGroupStep.querySelector( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\t\t\t\t\telItemStepCurrent.classList.add( 'running' );\n\n\t\t\t\t\tif ( 100 === percent ) {\n\t\t\t\t\t\telItemStepCurrent.classList.remove( 'running' );\n\t\t\t\t\t\telItemStepCurrent.classList.add( 'completed' );\n\t\t\t\t\t}\n\n\t\t\t\t\tconst progressBar = elItemStepCurrent.querySelector( '.progress-bar' );\n\t\t\t\t\tprogressBar.style.width = percent;\n\t\t\t\t};\n\n\t\t\t\t// Scroll to step current.\n\t\t\t\tconst scrollToStepCurrent = ( stepCurrent ) => {\n\t\t\t\t\tconst elItemStepCurrent = elGroupStep.querySelector( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\n\t\t\t\t\tconst offset = elItemStepCurrent.offsetTop - lpModalOverlay.elMainContent[ 0 ].offsetTop +\n\t\t\t\t\t\tlpModalOverlay.elMainContent[ 0 ].scrollTop;\n\n\t\t\t\t\tlpModalOverlay.elMainContent.stop().animate( {\n\t\t\t\t\t\tscrollTop: offset,\n\t\t\t\t\t}, 600 );\n\t\t\t\t};\n\n\t\t\t\tfor ( const table in tables ) {\n\t\t\t\t\tconst elItemStep = lpModalOverlay.elLPOverlay[ 0 ].querySelector( '.lp-item-step' ).cloneNode( true );\n\t\t\t\t\tconst input = elItemStep.querySelector( 'input' );\n\t\t\t\t\tconst label = elItemStep.querySelector( 'label' );\n\n\t\t\t\t\tlabel.textContent = `Table: ${ table }`;\n\t\t\t\t\tinput.value = table;\n\n\t\t\t\t\telGroupStep.append( elItemStep );\n\t\t\t\t}\n\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tconst url = '/lp/v1/admin/tools/create-indexs';\n\t\t\t\t\tconst params = { tables, table };\n\n\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'none';\n\t\t\t\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'none';\n\n\t\t\t\t\tshowProgress( table, 0.1 );\n\n\t\t\t\t\tconst functions = {\n\t\t\t\t\t\tsuccess: ( res ) => {\n\t\t\t\t\t\t\tconst { status, message, data: { table, percent } } = res;\n\n\t\t\t\t\t\t\tshowProgress( params.table, percent );\n\n\t\t\t\t\t\t\tif ( undefined !== table ) {\n\t\t\t\t\t\t\t\tif ( params.table !== table ) {\n\t\t\t\t\t\t\t\t\tshowProgress( table, 0.1 );\n\t\t\t\t\t\t\t\t\tscrollToStepCurrent( table );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tparams.table = table;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( 'success' === status ) {\n\t\t\t\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\t\t\t\thandleAjax( url, params, functions );\n\t\t\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t\t} else if ( 'finished' === status ) {\n\t\t\t\t\t\t\t\tconsole.log( 'finished' );\n\t\t\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'inline-block';\n\t\t\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Finish';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconsole.log( message );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: ( err ) => {\n\t\t\t\t\t\t\tconsole.log( err );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcompleted: () => {\n\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\thandleAjax( url, params, functions );\n\t\t\t\t};\n\t\t\t},\n\t\t\terror: ( err ) => {\n\n\t\t\t},\n\t\t\tcompleted: () => {\n\n\t\t\t},\n\t\t};\n\n\t\thandleAjax( url, params, functions );\n\t} );\n};\n\nexport default createIndexes;\n","import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst reUpgradeDB = () => {\n\tconst elToolReUpgradeDB = document.querySelector( '#lp-tool-re-upgrade-db' );\n\n\tif ( ! elToolReUpgradeDB ) {\n\t\treturn;\n\t}\n\n\t// Check valid to show popup re-upgrade\n\tlet url = 'lp/v1/database/check-db-valid-re-upgrade';\n\thandleAjax( url, {}, {\n\t\tsuccess( res ) {\n\t\t\tconst { data: { can_re_upgrade } } = res;\n\n\t\t\tif ( ! can_re_upgrade ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\telToolReUpgradeDB.style.display = 'block';\n\n\t\t\tconst elBtnReUpradeDB = elToolReUpgradeDB.querySelector( '.lp-btn-re-upgrade-db' );\n\t\t\tconst elMessage = elToolReUpgradeDB.querySelector( '.learn-press-message' );\n\n\t\t\telBtnReUpradeDB.addEventListener( 'click', () => {\n\t\t\t\t// eslint-disable-next-line no-alert\n\t\t\t\tif ( confirm( 'Are you want to Re Upgrade!' ) ) {\n\t\t\t\t\turl = 'lp/v1/database/del-tb-lp-upgrade-db';\n\t\t\t\t\thandleAjax( url, {}, {\n\t\t\t\t\t\tsuccess( res ) {\n\t\t\t\t\t\t\tconst { status, message, data: { url } } = res;\n\n\t\t\t\t\t\t\tif ( 'success' === status && undefined !== url ) {\n\t\t\t\t\t\t\t\twindow.location.href = url;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror( err ) {\n\t\t\t\t\t\t\telMessage.classList.add( 'error' );\n\t\t\t\t\t\t\telMessage.textContent = err.message;\n\t\t\t\t\t\t\telMessage.style.display = 'block';\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\terror( err ) {\n\n\t\t},\n\t} );\n};\n\nexport default reUpgradeDB;\n","import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst $ = jQuery;\n\nconst elToolUpgradeDB = $( '#lp-tool-upgrade-db' );\n\nconst upgradeDB = () => {\n\tlet isUpgrading = 0;\n\tconst elWrapperTermsUpgrade = elToolUpgradeDB.find( '.wrapper-terms-upgrade' );\n\tconst elStatusUpgrade = elToolUpgradeDB.find( '.wrapper-lp-status-upgrade' );\n\tconst elWrapperUpgradeMessage = elToolUpgradeDB.find( '.wrapper-lp-upgrade-message' );\n\tlet checkValidBeforeUpgrade = null;\n\n\tif ( elWrapperTermsUpgrade.length ) { // Show Terms Upgrade.\n\t\tlpModalOverlay.setContentModal( elWrapperTermsUpgrade.html() );\n\n\t\tconst elTermUpdate = lpModalOverlay.elLPOverlay.find( '.terms-upgrade' );\n\t\tconst elLPAgreeTerm = elTermUpdate.find( 'input[name=lp-agree-term]' );\n\t\tconst elTermMessage = elTermUpdate.find( '.error' );\n\t\tconst elMessageUpgrading = $( 'input[name=message-when-upgrading]' ).val();\n\n\t\tcheckValidBeforeUpgrade = function() {\n\t\t\telTermMessage.hide();\n\t\t\telTermMessage.removeClass( 'learn-press-message' );\n\n\t\t\tif ( elLPAgreeTerm.is( ':checked' ) ) {\n\t\t\t\thandleAjax( '/lp/v1/database/agree_terms', { agree_terms: 1 }, {} );\n\n\t\t\t\tlpModalOverlay.elFooter.find( '.learn-press-notice' ).remove();\n\t\t\t\tlpModalOverlay.elFooter.prepend( '<span class=\"learn-press-notice\">' + elMessageUpgrading + '</span>' );\n\t\t\t\tlpModalOverlay.setContentModal( elStatusUpgrade.html() );\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\telTermMessage.show();\n\t\t\telTermMessage.addClass( 'learn-press-message' );\n\t\t\tlpModalOverlay.elMainContent.animate( {\n\t\t\t\tscrollTop: elTermMessage.offset().top,\n\t\t\t} );\n\n\t\t\treturn false;\n\t\t};\n\t} else { // Show Steps Upgrade.\n\t\tlpModalOverlay.setContentModal( elStatusUpgrade.html() );\n\t\tcheckValidBeforeUpgrade = function() {\n\t\t\treturn true;\n\t\t};\n\t}\n\n\tlpModalOverlay.setTitleModal( elToolUpgradeDB.find( 'h2' ).html() );\n\tlpModalOverlay.elBtnYes.text( 'Upgrade' );\n\tlpModalOverlay.elBtnYes.show();\n\tlpModalOverlay.elBtnNo.text( 'close' );\n\tlpModalOverlay.callBackYes = function() {\n\t\tif ( ! checkValidBeforeUpgrade() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tisUpgrading = 1;\n\n\t\tlpModalOverlay.elBtnYes.hide();\n\t\tlpModalOverlay.elBtnNo.hide();\n\n\t\tconst urlHandle = '/lp/v1/database/upgrade';\n\t\tconst elGroupStep = lpModalOverlay.elLPOverlay.find( '.lp-group-step' );\n\t\tconst elItemSteps = elToolUpgradeDB.find( '.lp-item-step' );\n\n\t\t// Get params.\n\t\tconst steps = [];\n\n\t\t$.each( elItemSteps, function( i, el ) {\n\t\t\tconst elItemStepsTmp = $( el );\n\n\t\t\tif ( ! elItemStepsTmp.hasClass( 'completed' ) ) {\n\t\t\t\tconst step = elItemStepsTmp.find( 'input' ).val();\n\t\t\t\tsteps.push( step );\n\t\t\t}\n\t\t} );\n\n\t\tconst params = {\n\t\t\tsteps,\n\t\t\tstep: steps[ 0 ],\n\t\t};\n\n\t\tlet elItemStepCurrent = null;\n\n\t\t// Show progress when upgrading.\n\t\tconst showProgress = ( stepCurrent, percent ) => {\n\t\t\telItemStepCurrent = elGroupStep.find( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\t\t\telItemStepCurrent.addClass( 'running' );\n\n\t\t\tif ( 100 === percent ) {\n\t\t\t\telItemStepCurrent.removeClass( 'running' ).addClass( 'completed' );\n\t\t\t}\n\n\t\t\telItemStepCurrent.find( '.progress-bar' ).css( 'width', percent + '%' );\n\t\t\telItemStepCurrent.find( '.percent' ).text( percent + '%' );\n\t\t};\n\n\t\t// Scroll to step current.\n\t\tconst scrollToStepCurrent = ( stepCurrent ) => {\n\t\t\telItemStepCurrent = elGroupStep.find( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\n\t\t\tif ( ! elItemStepCurrent.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst offset = elItemStepCurrent.offset().top - lpModalOverlay.elMainContent.offset().top +\n\t\t\t\tlpModalOverlay.elMainContent.scrollTop();\n\n\t\t\tlpModalOverlay.elMainContent.stop().animate( {\n\t\t\t\tscrollTop: offset,\n\t\t\t}, 600 );\n\t\t};\n\n\t\tshowProgress( steps[ 0 ], 0.1 );\n\n\t\tconst funcCallBack = {\n\t\t\tsuccess: ( res ) => {\n\t\t\t\tshowProgress( params.step, res.percent );\n\n\t\t\t\tif ( params.step !== res.name ) {\n\t\t\t\t\tshowProgress( res.name, 0.1 );\n\t\t\t\t}\n\n\t\t\t\tscrollToStepCurrent( params.step );\n\n\t\t\t\tif ( 'success' === res.status ) {\n\t\t\t\t\tparams.step = res.name;\n\t\t\t\t\tparams.data = res.data;\n\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\thandleAjax( urlHandle, params, funcCallBack );\n\t\t\t\t\t}, 800 );\n\t\t\t\t} else if ( 'finished' === res.status ) {\n\t\t\t\t\tisUpgrading = 0;\n\t\t\t\t\telItemStepCurrent.removeClass( 'running' ).addClass( 'completed' );\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\tlpModalOverlay.setContentModal( elWrapperUpgradeMessage.html() );\n\t\t\t\t\t}, 1000 );\n\t\t\t\t\tlpModalOverlay.elFooter.find( '.learn-press-notice' ).remove();\n\t\t\t\t\tlpModalOverlay.elBtnNo.show();\n\t\t\t\t\tlpModalOverlay.elBtnNo.on( 'click', () => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tisUpgrading = 0;\n\t\t\t\t\tlpModalOverlay.elFooter.find( '.learn-press-notice' ).remove();\n\t\t\t\t\telItemStepCurrent.removeClass( 'running' ).addClass( 'error' );\n\t\t\t\t\tlpModalOverlay.setContentModal( elWrapperUpgradeMessage.html(), function() {\n\t\t\t\t\t\tlpModalOverlay.elBtnYes.text( 'Retry' ).show();\n\t\t\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\t\t\twindow.location.href = lpGlobalSettings.siteurl + '/wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db';\n\t\t\t\t\t\t};\n\t\t\t\t\t\tlpModalOverlay.elBtnNo.show();\n\n\t\t\t\t\t\tif ( ! res.message ) {\n\t\t\t\t\t\t\tres.message = 'Upgrade not success! Please clear cache, restart sever then retry or contact to LP to help';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlpModalOverlay.elMainContent.find( '.learn-press-message' ).addClass( 'error' ).html( res.message );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: ( err ) => {\n\t\t\t\tisUpgrading = 0;\n\t\t\t\tlpModalOverlay.setContentModal( elWrapperUpgradeMessage.html(), function() {\n\t\t\t\t\tlpModalOverlay.elBtnYes.text( 'Retry' ).show();\n\t\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\t\twindow.location.location = 'wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db';\n\t\t\t\t\t};\n\t\t\t\t\tlpModalOverlay.elBtnNo.show();\n\n\t\t\t\t\tif ( ! err.message ) {\n\t\t\t\t\t\terr.message = 'Upgrade not success! Something wrong. Please clear cache, restart sever then retry or contact to LP to help';\n\t\t\t\t\t}\n\n\t\t\t\t\tlpModalOverlay.elMainContent.find( '.learn-press-message' ).addClass( 'error' ).html( err.message );\n\t\t\t\t} );\n\t\t\t},\n\t\t\tcompleted: () => {\n\n\t\t\t},\n\t\t};\n\n\t\thandleAjax( urlHandle, params, funcCallBack );\n\t};\n\n\t// Show confirm if, within upgrading, the user reload the page.\n\twindow.onbeforeunload = function() {\n\t\tif ( isUpgrading ) {\n\t\t\treturn 'LP is upgrading Database. Are you want to reload page?';\n\t\t}\n\t};\n\n\t// Show confirm if, within upgrading, the user close the page.\n\twindow.onclose = function() {\n\t\tif ( isUpgrading ) {\n\t\t\treturn 'LP is upgrading Database. Are you want to close page?';\n\t\t}\n\t};\n};\n\nconst getStepsUpgradeStatus = () => {\n\tif ( ! elToolUpgradeDB.length ) {\n\t\treturn;\n\t}\n\n\t// initial LP Modal Overlay\n\tif ( ! lpModalOverlay.init() ) {\n\t\treturn;\n\t}\n\n\tconst elWrapperStatusUpgrade = $( '.wrapper-lp-status-upgrade' );\n\tconst urlHandle = '/lp/v1/database/get_steps';\n\n\t// Show dialog upgrade database.\n\tconst queryString = window.location.search;\n\tconst urlParams = new URLSearchParams( queryString );\n\tconst action = urlParams.get( 'action' );\n\n\tif ( 'upgrade-db' === action ) {\n\t\tlpModalOverlay.elLPOverlay.show();\n\t\tlpModalOverlay.setTitleModal( elToolUpgradeDB.find( 'h2' ).html() );\n\t\tlpModalOverlay.setContentModal( $( '.wrapper-lp-loading' ).html() );\n\t}\n\n\tconst funcCallBack = {\n\t\tsuccess: ( res ) => {\n\t\t\tconst { steps_completed, steps_default } = res;\n\n\t\t\tif ( undefined === steps_completed || undefined === steps_default ) {\n\t\t\t\tconsole.log( 'invalid steps_completed and steps_default' );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Render show Steps.\n\t\t\tlet htmlStep = '';\n\t\t\tfor ( const k_gr_steps in steps_default ) {\n\t\t\t\tconst step_group = steps_default[ k_gr_steps ];\n\t\t\t\tconst steps = step_group.steps;\n\n\t\t\t\thtmlStep = '<div class=\"lp-group-step\">';\n\t\t\t\thtmlStep += '<h3>' + step_group.label + '</h3>';\n\n\t\t\t\tfor ( const k_step in steps ) {\n\t\t\t\t\tconst step = steps[ k_step ];\n\t\t\t\t\tlet completed = '';\n\n\t\t\t\t\tif ( undefined !== steps_completed[ k_step ] ) {\n\t\t\t\t\t\tcompleted = 'completed';\n\t\t\t\t\t}\n\n\t\t\t\t\thtmlStep += '<div class=\"lp-item-step ' + completed + '\">';\n\t\t\t\t\thtmlStep += '<div class=\"lp-item-step-left\"><input type=\"hidden\" name=\"lp_steps_upgrade_db[]\" value=\"' + step.name + '\" /></div>';\n\t\t\t\t\thtmlStep += '<div class=\"lp-item-step-right\">';\n\t\t\t\t\thtmlStep += '<label for=\"\"><strong></strong>' + step.label + '</label>';\n\t\t\t\t\thtmlStep += '<div class=\"description\">' + step.description + '</div>';\n\t\t\t\t\thtmlStep += '<div class=\"percent\"></div>';\n\t\t\t\t\thtmlStep += '<span class=\"progress-bar\"></span>';\n\t\t\t\t\thtmlStep += '</div>';\n\t\t\t\t\thtmlStep += '</div>';\n\t\t\t\t}\n\n\t\t\t\thtmlStep += '</div>';\n\n\t\t\t\telWrapperStatusUpgrade.append( htmlStep );\n\n\t\t\t\tconst elBtnUpgradeDB = $( '.lp-btn-upgrade-db' );\n\n\t\t\t\tif ( 'upgrade-db' === action ) {\n\t\t\t\t\tupgradeDB();\n\t\t\t\t}\n\n\t\t\t\telBtnUpgradeDB.on( 'click', function() {\n\t\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\t\tupgradeDB();\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\terror: ( err ) => {\n\n\t\t},\n\t\tcompleted: () => {\n\n\t\t},\n\t};\n\n\thandleAjax( urlHandle, {}, funcCallBack );\n};\n\nexport default getStepsUpgradeStatus;\n","/**\n * Reset course progress.\n *\n * @since 4.0.5.\n * @author Nhamdv - Code choi choi in Physcode.\n */\nconst { __ } = wp.i18n;\nconst { TextControl, Button, Spinner, CheckboxControl, Notice } = wp.components;\nconst { useState, useEffect } = wp.element;\nconst { addQueryArgs } = wp.url;\n\nconst ResetCourse = () => {\n\tconst [ loading, setLoading ] = useState( false );\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ data, setData ] = useState( [] );\n\tconst [ checkData, setCheckData ] = useState( [] );\n\tconst [ message, setMessage ] = useState( [] );\n\tconst [ loadingReset, setLoadingReset ] = useState( false );\n\n\tuseEffect( () => {\n\t\tresponsiveData( search );\n\t}, [ search ] );\n\n\tconst responsiveData = async ( s ) => {\n\t\ttry {\n\t\t\tif ( ! s || loading ) {\n\t\t\t\tsetMessage( [] );\n\t\t\t\tsetData( [] );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( s.length < 3 ) {\n\t\t\t\tsetMessage( [ { status: 'error', message: 'Please enter at least 3 characters to searching course.' } ] );\n\t\t\t\tsetData( [] );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetLoading( true );\n\n\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\tpath: addQueryArgs( 'lp/v1/admin/tools/reset-data/search-courses', {\n\t\t\t\t\ts,\n\t\t\t\t} ),\n\t\t\t\tmethod: 'GET',\n\t\t\t} );\n\n\t\t\tconst { status, data } = response;\n\n\t\t\tsetLoading( false );\n\n\t\t\tif ( status === 'success' ) {\n\t\t\t\tsetData( data );\n\t\t\t\tsetMessage( [] );\n\t\t\t} else {\n\t\t\t\tsetMessage( [ { status: 'error', message: response.message || 'LearnPress: Search Course Fail!' } ] );\n\t\t\t\tsetData( [] );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tconsole.log( error.message );\n\t\t}\n\t};\n\n\tfunction checkItems( id ) {\n\t\tconst datas = [ ...checkData ];\n\n\t\tif ( datas.includes( id ) ) {\n\t\t\tconst index = datas.indexOf( id );\n\n\t\t\tif ( index > -1 ) {\n\t\t\t\tdatas.splice( index, 1 );\n\t\t\t}\n\t\t} else {\n\t\t\tdatas.push( id );\n\t\t}\n\n\t\tsetCheckData( datas );\n\t}\n\n\tconst resetCourse = async () => {\n\t\tif ( checkData.length === 0 ) {\n\t\t\tsetMessage( [ { status: 'error', message: 'Please chooce Course for reset data!' } ] );\n\t\t\treturn;\n\t\t}\n\n\t\t// eslint-disable-next-line no-alert\n\t\tif ( ! confirm( 'Are you sure to reset course progress of all users enrolled this course?' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst notice = [];\n\n\t\ttry {\n\t\t\tsetLoadingReset( true );\n\n\t\t\tfor ( const courseId of checkData ) {\n\t\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\t\tpath: addQueryArgs( 'lp/v1/admin/tools/reset-data/reset-courses', {\n\t\t\t\t\t\tcourseId,\n\t\t\t\t\t} ),\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t} );\n\n\t\t\t\tconst { status, data, message } = response;\n\n\t\t\t\tnotice.push( { status, message: message || `Course #${ courseId } reset successfully!` } );\n\t\t\t}\n\n\t\t\tsetLoadingReset( false );\n\t\t} catch ( error ) {\n\t\t\tnotice.push( { status: 'error', message: error.message || `LearnPress Error: Reset Course Data.` } );\n\t\t}\n\n\t\tsetMessage( notice );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<h2>{ __( 'Reset course progress', 'learnpress' ) }</h2>\n\t\t\t<div className=\"description\">\n\t\t\t\t<p>{ __( 'This action will reset progress of a course for all users have enrolled.', 'learnpress' ) }</p>\n\t\t\t\t<p>{ __( 'Search results only show course have user data.', 'learnpress' ) }</p>\n\t\t\t\t<div>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tplaceholder={ __( 'Search course by name', 'learnpress' ) }\n\t\t\t\t\t\tvalue={ search }\n\t\t\t\t\t\tonChange={ ( value ) => setSearch( value ) }\n\t\t\t\t\t\tstyle={ { width: 300 } }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{ loading && <Spinner /> }\n\n\t\t\t{ data.length > 0 && (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"lp-reset-course_progress\" style={ {\n\t\t\t\t\t\tborder: '1px solid #eee',\n\t\t\t\t\t} }>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div style={ { background: '#eee' } }>\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\tchecked={ checkData.length === data.length }\n\t\t\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\t\t\tif ( checkData.length === data.length ) {\n\t\t\t\t\t\t\t\t\t\t\t\tsetCheckData( [] );\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tsetCheckData( data.map( ( dt ) => dt.id ) );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tstyle={ { margin: 0 } }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div>{ __( 'ID', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t\t<div>{ __( 'Name', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t\t<div>{ __( 'Students', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div style={ { height: '100%', maxHeight: 200, overflow: 'auto' } }>\n\t\t\t\t\t\t\t{ data.map( ( dt ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<div style={ { borderTop: '1px solid #eee' } } key={ dt.id }>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={ checkData.includes( dt.id ) }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={ () => checkItems( dt.id ) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div>#{ dt.id }</div>\n\t\t\t\t\t\t\t\t\t\t<div>{ dt.title }</div>\n\t\t\t\t\t\t\t\t\t\t<div>{ dt.students }</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{ loadingReset ? <Spinner /> : (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisPrimary\n\t\t\t\t\t\t\tonClick={ () => resetCourse() }\n\t\t\t\t\t\t\tstyle={ { marginTop: 10, height: 30 } }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset now', 'learnpress' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ message.length > 0 && message.map( ( mess, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Notice status={ mess.status } key={ index } isDismissible={ false }>\n\t\t\t\t\t\t{ mess.message }\n\t\t\t\t\t</Notice>\n\t\t\t\t);\n\t\t\t} ) }\n\n\t\t\t<style>\n\t\t\t\t{ '\\\n\t\t\t\t.lp-reset-course_progress .components-base-control__field {\\\n\t\t\t\t\tmargin: 0;\\\n\t\t\t\t}\\\n\t\t\t\t.components-notice{\\\n\t\t\t\t\tmargin-left: 0;\\\n\t\t\t\t}\\\n\t\t\t\t.lp-reset-course_progress > div > div{\\\n\t\t\t\t\tdisplay: grid;\\\n\t\t\t\t\tgrid-template-columns: 80px 50px 1fr 80px;\\\n\t\t\t\t\talign-items: center;\\\n\t\t\t\t}\\\n\t\t\t\t.lp-reset-course_progress > div > div > div{\\\n\t\t\t\t\tmaegin: 0;\\\n\t\t\t\t\tpadding: 8px 10px;\\\n\t\t\t\t}\\\n\t\t\t\t' }\n\n\t\t\t</style>\n\t\t</>\n\t);\n};\nexport default ResetCourse;\n","import ResetCourse from './course';\n\nconst resetData = () => {\n\tif ( document.querySelectorAll( '#learn-press-reset-course-users' ).length > 0 ) {\n\t\twp.element.render( <ResetCourse />, [ ...document.querySelectorAll( '#learn-press-reset-course-users' ) ][ 0 ] );\n\t}\n};\nexport default resetData;\n","const handleAjax = function( url, params, functions ) {\n\twp.apiFetch( {\n\t\tpath: url,\n\t\tmethod: 'POST',\n\t\tdata: params,\n\t} ).then( ( res ) => {\n\t\tif ( 'function' === typeof functions.success ) {\n\t\t\tfunctions.success( res );\n\t\t}\n\t} ).catch( ( err ) => {\n\t\tif ( 'function' === typeof functions.error ) {\n\t\t\tfunctions.error( err );\n\t\t}\n\t} ).then( () => {\n\t\tif ( 'function' === typeof functions.completed ) {\n\t\t\tfunctions.completed();\n\t\t}\n\t} );\n};\n\nexport default handleAjax;\n","const $ = jQuery;\nlet elLPOverlay = null;\nconst lpModalOverlay = {\n\telLPOverlay: null,\n\telMainContent: null,\n\telTitle: null,\n\telBtnYes: null,\n\telBtnNo: null,\n\telFooter: null,\n\telCalledModal: null,\n\tcallBackYes: null,\n\tinstance: null,\n\tinit() {\n\t\tif ( this.instance ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.elLPOverlay = $( '.lp-overlay' );\n\n\t\tif ( ! this.elLPOverlay.length ) {\n\t\t\treturn false;\n\t\t}\n\t\telLPOverlay = this.elLPOverlay;\n\n\t\tthis.elMainContent = elLPOverlay.find( '.main-content' );\n\t\tthis.elTitle = elLPOverlay.find( '.modal-title' );\n\t\tthis.elBtnYes = elLPOverlay.find( '.btn-yes' );\n\t\tthis.elBtnNo = elLPOverlay.find( '.btn-no' );\n\t\tthis.elFooter = elLPOverlay.find( '.lp-modal-footer' );\n\n\t\t$( document ).on( 'click', '.close, .btn-no', function() {\n\t\t\telLPOverlay.hide();\n\t\t} );\n\n\t\t$( document ).on( 'click', '.btn-yes', function( e ) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\n\t\t\tif ( 'function' === typeof lpModalOverlay.callBackYes ) {\n\t\t\t\tlpModalOverlay.callBackYes();\n\t\t\t}\n\t\t} );\n\n\t\tthis.instance = this;\n\n\t\treturn true;\n\t},\n\tsetElCalledModal( elCalledModal ) {\n\t\tthis.elCalledModal = elCalledModal;\n\t},\n\tsetContentModal( content, event ) {\n\t\tthis.elMainContent.html( content );\n\t\tif ( 'function' === typeof event ) {\n\t\t\tevent();\n\t\t}\n\t},\n\tsetTitleModal( content ) {\n\t\tthis.elTitle.html( content );\n\t},\n};\n\nexport default lpModalOverlay;\n","module.exports = window[\"wp\"][\"element\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import getStepsUpgradeStatus from './tools/database/upgrade';\nimport createIndexes from './tools/database/create_indexs';\nimport reUpgradeDB from './tools/database/re-upgrade-db';\nimport cleanDatabases from './tools/database/clean_database';\n\nimport resetData from './tools/reset-data';\n\n( function( $ ) {\n\tconst $doc = $( document );\n\tlet isRunning = false;\n\n\tconst installSampleCourse = function installSampleCourse( e ) {\n\t\te.preventDefault();\n\n\t\tconst $button = $( this );\n\n\t\tif ( isRunning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! confirm( lpGlobalSettings.i18n.confirm_install_sample_data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$button.addClass( 'disabled' ).html( $button.data( 'installing-text' ) );\n\t\t$( '.lp-install-sample__response' ).remove();\n\t\tisRunning = true;\n\n\t\t$.ajax( {\n\t\t\turl: $button.attr( 'href' ),\n\t\t\tdata: $( '.lp-install-sample__options' ).serializeJSON(),\n\t\t\tsuccess( response ) {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst uninstallSampleCourse = function uninstallSampleCourse( e ) {\n\t\te.preventDefault();\n\n\t\tconst $button = $( this );\n\n\t\tif ( isRunning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! confirm( lpGlobalSettings.i18n.confirm_uninstall_sample_data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$button.addClass( 'disabled' ).html( $button.data( 'uninstalling-text' ) );\n\t\tisRunning = true;\n\n\t\t$.ajax( {\n\t\t\turl: $button.attr( 'href' ),\n\t\t\tsuccess( response ) {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst clearHardCache = function clearHardCache( e ) {\n\t\te.preventDefault();\n\t\tconst $button = $( this );\n\n\t\tif ( $button.hasClass( 'disabled' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$button.addClass( 'disabled' ).html( $button.data( 'cleaning-text' ) );\n\t\t$.ajax( {\n\t\t\turl: $button.attr( 'href' ),\n\t\t\tdata: {},\n\t\t\tsuccess( response ) {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst toggleHardCache = function toggleHardCache() {\n\t\t$.ajax( {\n\t\t\turl: 'admin.php?page=lp-toggle-hard-cache-option',\n\t\t\tdata: { v: this.checked ? 'yes' : 'no' },\n\t\t\tsuccess( response ) {\n\t\t\t},\n\t\t\terror() {\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst toggleOptions = function toggleOptions( e ) {\n\t\te.preventDefault();\n\t\t$( '.lp-install-sample__options' ).toggleClass( 'hide-if-js' );\n\t};\n\n\t$( function() {\n\t\tgetStepsUpgradeStatus();\n\t\tcreateIndexes();\n\t\treUpgradeDB();\n\t\tresetData();\n\t\tcleanDatabases();\n\t\t$doc.on( 'click', '.lp-install-sample__install', installSampleCourse )\n\t\t\t.on( 'click', '.lp-install-sample__uninstall', uninstallSampleCourse )\n\t\t\t.on( 'click', '#learn-press-clear-cache', clearHardCache )\n\t\t\t.on( 'click', 'input[name=\"enable_hard_cache\"]', toggleHardCache )\n\t\t\t.on( 'click', '.lp-install-sample__toggle-options', toggleOptions );\n\t} );\n}( jQuery ) );\n"],"names":["lpModalOverlay","handleAjax","cleanDatabases","elCleanDatabases","document","querySelector","elBtnCleanDatabases","addEventListener","e","preventDefault","elToolsSelect","ElToolSelectLi","querySelectorAll","checkedOne","Array","prototype","slice","call","some","x","checked","prepareMessage","style","display","textContent","elLoading","init","elLPOverlay","show","setContentModal","innerHTML","setTitleModal","elBtnYes","elBtnNo","listTables","ElToolSelectLiCheked","forEach","push","value","tables","item","itemtotal","getAttribute","modal","notice","callBackYes","r","confirm","url","params","functions","success","res","status","message","data","processed","percent","modalItem","progressBarRows","progressPercent","progressValue","console","log","setTimeout","width","color","background","location","reload","error","err","completed","createIndexes","elCreateIndexTables","elBtnCreateIndexes","table","elSteps","elGroupStep","showProgress","stepCurrent","elItemStepCurrent","closest","classList","add","remove","progressBar","scrollToStepCurrent","offset","offsetTop","elMainContent","scrollTop","stop","animate","elItemStep","cloneNode","input","label","append","undefined","reUpgradeDB","elToolReUpgradeDB","can_re_upgrade","elBtnReUpradeDB","elMessage","window","href","$","jQuery","elToolUpgradeDB","upgradeDB","isUpgrading","elWrapperTermsUpgrade","find","elStatusUpgrade","elWrapperUpgradeMessage","checkValidBeforeUpgrade","length","html","elTermUpdate","elLPAgreeTerm","elTermMessage","elMessageUpgrading","val","hide","removeClass","is","agree_terms","elFooter","prepend","addClass","top","text","urlHandle","elItemSteps","steps","each","i","el","elItemStepsTmp","hasClass","step","css","funcCallBack","name","on","lpGlobalSettings","siteurl","onbeforeunload","onclose","getStepsUpgradeStatus","elWrapperStatusUpgrade","queryString","search","urlParams","URLSearchParams","action","get","steps_completed","steps_default","htmlStep","k_gr_steps","step_group","k_step","description","elBtnUpgradeDB","__","wp","i18n","TextControl","Button","Spinner","CheckboxControl","Notice","components","useState","useEffect","element","addQueryArgs","ResetCourse","loading","setLoading","setSearch","setData","checkData","setCheckData","setMessage","loadingReset","setLoadingReset","responsiveData","s","response","apiFetch","path","method","checkItems","id","datas","includes","index","indexOf","splice","resetCourse","courseId","border","map","dt","margin","height","maxHeight","overflow","borderTop","title","students","marginTop","mess","resetData","render","then","catch","elTitle","elCalledModal","instance","stopPropagation","setElCalledModal","content","event","$doc","isRunning","installSampleCourse","$button","confirm_install_sample_data","ajax","attr","serializeJSON","insertBefore","parent","uninstallSampleCourse","confirm_uninstall_sample_data","clearHardCache","toggleHardCache","v","toggleOptions","toggleClass"],"sourceRoot":""}
assets/js/dist/admin/pages/tools.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-element'), 'version' => '19c061020aacc34db1f5');
assets/js/dist/admin/pages/widgets.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '7c77b9edfd6623e822d9');
assets/js/dist/admin/pages/widgets.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/widgets.js","mappings":";;;;;AAAA,MAAMA,CAAC,GAAGC,MAAV;;AAEA,SAASC,YAAT,CAAuBC,IAAvB,EAA8B;AAC7B,MAAKA,IAAI,CAACC,OAAV,EAAoB;AACnB,WAAOD,IAAI,CAACE,IAAZ;AACA;;AACD,QAAMC,MAAM,GAAG,8CAA8CH,IAAI,CAACI,EAAnD,GAAwD,KAAxD,GAAgEJ,IAAI,CAACK,KAAL,CAAWC,QAA3E,GAAsF,QAArG;AACA,SAAOH,MAAP;AACA;;AAED,SAASI,qBAAT,CAAgCP,IAAhC,EAAuC;AACtC,SAAOA,IAAI,CAACK,KAAL,CAAWC,QAAX,IAAuBN,IAAI,CAACE,IAAnC;AACA;;AAED,SAASM,kBAAT,GAA6C;AAAA,MAAhBC,MAAgB,uEAAP,IAAO;AAC5C,QAAMC,OAAO,GAAGb,CAAC,CAAE,0BAAF,CAAjB;AACA,QAAMc,SAAS,GAAGD,OAAO,CAACE,IAAR,CAAc,UAAd,CAAlB;AACA,QAAMC,QAAQ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CAAkB,2BAAlB,EAA+C,YAAW;AACzD3B,MAAAA,kBAAkB;AAClB,KAFD;AAIAA,IAAAA,kBAAkB;AAClB;AACD,CAZD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/widgets.js"],"sourcesContent":["const $ = jQuery;\n\nfunction formatCourse( repo ) {\n\tif ( repo.loading ) {\n\t\treturn repo.text;\n\t}\n\tconst markup = \"<div class='select2-result-course_title'>\" + repo.id + ' - ' + repo.title.rendered + '</div>';\n\treturn markup;\n}\n\nfunction formatCourseSelection( repo ) {\n\treturn repo.title.rendered || repo.text;\n}\n\nfunction autocompleteWidget( widget = null ) {\n\tconst searchs = $( '.lp-widget_select_course' );\n\tconst wpRestUrl = searchs.data( 'rest-url' );\n\tconst postType = searchs.data( 'post_type' ) || 'lp_course';\n\n\tsearchs.select2( {\n\t\tajax: {\n\t\t\tmethod: 'GET',\n\t\t\turl: wpRestUrl + 'wp/v2/' + postType,\n\t\t\tdataType: 'json',\n\t\t\tdelay: 250,\n\t\t\tdata( params ) {\n\t\t\t\treturn {\n\t\t\t\t\tsearch: params.term,\n\t\t\t\t};\n\t\t\t},\n\t\t\tprocessResults( data, params ) {\n\t\t\t\tparams.page = params.page || 1;\n\n\t\t\t\treturn {\n\t\t\t\t\tresults: data,\n\t\t\t\t};\n\t\t\t},\n\t\t\tcache: true,\n\t\t},\n\t\tescapeMarkup( markup ) {\n\t\t\treturn markup;\n\t\t},\n\t\tminimumInputLength: 2,\n\t\ttemplateResult: formatCourse, // omitted for brevity, see the source of this page\n\t\ttemplateSelection: formatCourseSelection, // omitted for brevity, see the source of this page\n\t} );\n}\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\tif ( document.querySelector( '#widgets-editor' ) ) {\n\t\t$( document ).on( 'widget-added', function( event, widget ) {\n\t\t\tautocompleteWidget( widget );\n\t\t} );\n\t} else {\n\t\t$( document ).on( 'learnpress/widgets/select', function() {\n\t\t\tautocompleteWidget();\n\t\t} );\n\n\t\tautocompleteWidget();\n\t}\n} );\n"],"names":["$","jQuery","formatCourse","repo","loading","text","markup","id","title","rendered","formatCourseSelection","autocompleteWidget","widget","searchs","wpRestUrl","data","postType","select2","ajax","method","url","dataType","delay","params","search","term","processResults","page","results","cache","escapeMarkup","minimumInputLength","templateResult","templateSelection","document","addEventListener","event","querySelector","on"],"sourceRoot":""}
assets/js/dist/admin/pages/widgets.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '1e98165f6a5c249f68e7');
assets/js/dist/blocks/index.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '73019e47f1103c1cb5be');
assets/js/dist/blocks/index.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/blocks/index.js CHANGED
@@ -105,7 +105,7 @@ function Edit(_ref) {
105
  className: "wp-block-learnpress-template__placeholder-inner"
106
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)(
107
  /* translators: %s is the template title */
108
- (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your course image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.', 'learnpress'), templateTitle))));
109
  }
110
 
111
  /***/ }),
105
  className: "wp-block-learnpress-template__placeholder-inner"
106
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)(
107
  /* translators: %s is the template title */
108
+ (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('This is an editor placeholder for the %s. This will be replaced by the template in your store and displayed with your course image(s), title, price, and so on. You can move this placeholder around and add further blocks around it to extend the template.', 'learnpress'), templateTitle))));
109
  }
110
 
111
  /***/ }),
assets/js/dist/blocks/index.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/blocks/index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;AAUA;AACA;AACA;;;AACO,MAAMQ,wBAAwB,GAAG,MAAM;AAC7C,GACCZ,sCADD,EAEEa,OAFF,CAEWH,aAFX;AAGA,CAJM;AAMPE,wBAAwB,G","sources":["webpack://learnpress/./node_modules/@wordpress/icons/build-module/library/page.js","webpack://learnpress/./assets/src/apps/js/blocks/category.js","webpack://learnpress/./assets/src/apps/js/blocks/template/edit.js","webpack://learnpress/./assets/src/apps/js/blocks/template/index.js","webpack://learnpress/external window [\"wp\",\"blockEditor\"]","webpack://learnpress/external window [\"wp\",\"blocks\"]","webpack://learnpress/external window [\"wp\",\"components\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/external window [\"wp\",\"primitives\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/blocks/index.js"],"sourcesContent":["import { createElement } from \"@wordpress/element\";\n\n/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nconst page = createElement(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, createElement(Path, {\n d: \"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z\"\n}));\nexport default page;\n//# sourceMappingURL=page.js.map","import { getCategories, setCategories } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\nsetCategories( [\n\t...getCategories().filter( ( { slug } ) => slug !== 'learnpress' ),\n\t{\n\t\tslug: 'learnpress',\n\t\ttitle: __( 'LearnPress', 'learnpress' ),\n\t},\n] );\n","\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { Placeholder } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { page } from '@wordpress/icons';\n\nconst TEMPLATES = {\n\t'single-course': {\n\t\ttitle: __( 'LearnPress Single Course Template', 'learnpress' ),\n\t\tplaceholder: 'single-course',\n\t},\n\t'archive-course': {\n\t\ttitle: __( 'LearnPress Course Archive Template', 'learnpress' ),\n\t\tplaceholder: 'archive-course',\n\t},\n};\n\nexport default function Edit( { attributes } ) {\n\tconst blockProps = useBlockProps();\n\tconst templateTitle = TEMPLATES[ attributes.template ]?.title ?? attributes.template;\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<Placeholder\n\t\t\t\ticon={ page }\n\t\t\t\tlabel={ templateTitle }\n\t\t\t\tclassName=\"wp-block-learnpress-template__placeholder\"\n\t\t\t>\n\t\t\t\t<div className=\"wp-block-learnpress-template__placeholder-inner\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %s is the template title */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'This is an editor placeholder for the %s. This will be replaced by the template in your store and displayed with your course image(s), title, price, and so on. You can move this placeholder around and add further blocks around it to extend the template.',\n\t\t\t\t\t\t\t'learnpress'\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttemplateTitle\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</Placeholder>\n\t\t</div>\n\t);\n}\n","\nimport { __ } from '@wordpress/i18n';\n\nimport edit from './edit';\n\nimport metadata from './block.json';\n\nconst { name } = metadata;\n\nconst settings = {\n\ttitle: 'LearnPress Template',\n\tkeywords: [ 'learnpress', 'template' ],\n\tdescription: __( 'Renders LearnPress PHP templates.', 'learnpress' ),\n\ticon: 'archive',\n\tedit,\n\tsave: () => null,\n};\n\nexport { name, settings, metadata };\n","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"primitives\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { registerBlockType } from '@wordpress/blocks';\n\nimport './category';\n\nimport * as template from './template';\n\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\n\tconst { metadata, settings, name } = block;\n\n\tregisterBlockType( name, { ...metadata, ...settings } );\n};\n\n/**\n * Function to register blocks.\n */\nexport const registerLearnPressBlocks = () => {\n\t[\n\t\ttemplate,\n\t].forEach( registerBlock );\n};\n\nregisterLearnPressBlocks();\n"],"names":["getCategories","setCategories","__","filter","slug","title","useBlockProps","Placeholder","sprintf","page","TEMPLATES","placeholder","Edit","attributes","blockProps","templateTitle","template","edit","metadata","name","settings","keywords","description","icon","save","registerBlockType","registerBlock","block","registerLearnPressBlocks","forEach"],"sourceRoot":""}
assets/js/dist/blocks/index.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '120b0f287e2d3d963d6e');
assets/js/dist/blocks/index.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/become-teacher.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'b5a6a897ba6e93068ca3');
assets/js/dist/frontend/become-teacher.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/become-teacher.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEAA,MAAM,CAAE,UAAUC,CAAV,EAAc;AACrBA,EAAAA,CAAC,CAAE,kCAAF,CAAD,CAAwCC,IAAxC,CAA8C,YAAW;AACxD,UAAMC,KAAK,GAAGF,CAAC,CAAE,IAAF,CAAf;AAAA,UACCG,OAAO,GAAGD,KAAK,CAACE,IAAN,CAAY,uBAAZ,CADX;AAAA,UAECC,YAAY,GAAG,YAAW;AACzBL,MAAAA,CAAC,CAAE,0CAAF,CAAD,CAAgDM,OAAhD,CAAyD,MAAzD,EAAiE,YAAW;AAC3EN,QAAAA,CAAC,CAAE,IAAF,CAAD,CAAUO,MAAV;AACA,OAFD;AAGA,KANF;AAAA,UAOCC,YAAY,GAAG,UAAUC,QAAV,EAAqB;AACnC,UAAIC,CAAC,GAAG,EAAR;;AACA,UAAKV,CAAC,CAACW,aAAF,CAAiBF,QAAjB,CAAL,E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AO,EAAEtB,WANF;AAOPuB,UAAAA,KAAK,EAAEjB;AAPA,SAAR;AASA;;AACD,aAAO,KAAP;AACA,KAjBD;AAkBA,GA9ED;AA+EA,CAhFK,CAAN,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/become-teacher.js"],"sourcesContent":["/**\n * Become a Teacher form handler js\n *\n * @author ThimPress\n * @version 3.0.0\n */\n\njQuery( function( $ ) {\n\t$( 'form[name=\"become-teacher-form\"]' ).each( function() {\n\t\tconst $form = $( this ),\n\t\t\t$submit = $form.find( 'button[type=\"submit\"]' ),\n\t\t\thideMessages = function() {\n\t\t\t\t$( '.learn-press-error, .learn-press-message' ).fadeOut( 'fast', function() {\n\t\t\t\t\t$( this ).remove();\n\t\t\t\t} );\n\t\t\t},\n\t\t\tshowMessages = function( messages ) {\n\t\t\t\tlet m = [];\n\t\t\t\tif ( $.isPlainObject( messages ) ) {\n\t\t\t\t\tfor ( const i in messages ) {\n\t\t\t\t\t\tm.push( $( messages[ i ] ) );\n\t\t\t\t\t}\n\t\t\t\t} else if ( $.isArray( messages ) ) {\n\t\t\t\t\tm = messages.reverse();\n\t\t\t\t} else {\n\t\t\t\t\tm = [ messages ];\n\t\t\t\t}\n\t\t\t\tfor ( let i = 0; i < m.length; i++ ) {\n\t\t\t\t\t$( m[ i ] ).insertBefore( $form );\n\t\t\t\t}\n\t\t\t},\n\t\t\tblockForm = function( block ) {\n\t\t\t\treturn $form.find( 'input, select, button, textarea' )\n\t\t\t\t\t.prop( 'disabled', !! block );\n\t\t\t},\n\t\t\tbeforeSend = function() {\n\t\t\t\thideMessages();\n\n\t\t\t\tblockForm( true )\n\t\t\t\t\t.filter( $submit )\n\t\t\t\t\t.data( 'origin-text', $submit.text() )\n\t\t\t\t\t.html( $submit.data( 'text' ) );\n\t\t\t},\n\t\t\tajaxSuccess = function( response ) {\n\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\tif ( response.message ) {\n\t\t\t\t\tshowMessages( response.message );\n\t\t\t\t}\n\n\t\t\t\tblockForm().filter( $submit ).html( $submit.data( 'origin-text' ) );\n\n\t\t\t\tif ( response.result === 'success' ) {\n\t\t\t\t\t$form.remove();\n\t\t\t\t} else {\n\t\t\t\t\t$submit.prop( 'disabled', false );\n\t\t\t\t\t$submit.html( $submit.data( 'text' ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\tajaxError = function( response ) {\n\t\t\t\tresponse = LP.parseJSON( response );\n\n\t\t\t\tif ( response.message ) {\n\t\t\t\t\tshowMessages( response.message );\n\t\t\t\t}\n\n\t\t\t\tblockForm().filter( $submit ).html( $submit.data( 'origin-text' ) );\n\t\t\t};\n\n\t\t$form.on( 'submit', function( e ) {\n\t\t\te.preventDefault();\n\t\t\tif ( $form.triggerHandler( 'become_teacher_send' ) !== false ) {\n\t\t\t\tconst url = new URL( window.location.href );\n\t\t\t\turl.searchParams.set( 'lp-ajax', 'request-become-a-teacher' );\n\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl,\n\t\t\t\t\tdata: $form.serialize(),\n\t\t\t\t\tdataType: 'text',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tbeforeSend,\n\t\t\t\t\tsuccess: ajaxSuccess,\n\t\t\t\t\terror: ajaxError,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn false;\n\t\t} );\n\t} );\n} );\n\n"],"names":["jQuery","$","each","$form","$submit","find","hideMessages","fadeOut","remove","showMessages","messages","m","isPlainObject","i","push","isArray","reverse","length","insertBefore","blockForm","block","prop","beforeSend","filter","data","text","html","ajaxSuccess","response","LP","parseJSON","message","result","ajaxError","on","e","preventDefault","triggerHandler","url","URL","window","location","href","searchParams","set","ajax","serialize","dataType","type","success","error"],"sourceRoot":""}
assets/js/dist/frontend/become-teacher.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '294829317bd95b4cafa7');
assets/js/dist/frontend/checkout.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '2cf04ff10e0b5aa59941');
assets/js/dist/frontend/checkout.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/checkout.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAaC,QAAb,EAAwB;AACzB;;AAEA,MAAKC,MAAM,CAACC,EAAP,KAAcC,SAAnB,EAA+B;AAC9BF,IAAAA,MAAM,CAACC,EAAP,GAAY,EAAZ;AACA;AAED;AACD;AACA;AACA;AACA;;;AACC,QAAME,QAAQ,GAAGF,EAAE,CAACE,QAAH,GAAc,UAAUC,OAAV,EAAoB;AAClD,UAAMC,aAAa,GAAGP,CAAC,CAAE,4BAAF,CAAvB;AAAA,UAECQ,UAAU,GAAGR,CAAC,CAAE,6BAAF,CAFf;AAAA,UAICS,aAAa,GAAGT,CAAC,CAAE,gCAAF,CAJlB;AAAA,UAMCU,SAAS,GAAGV,CAAC,CAAE,kBAAF,CANd;AAAA,UAQCW,eAAe,GAAGX,CAAC,CAAE,mCAAF,CARpB;AAAA,UAUCY,cAAc,GAAGZ,CAAC,CAAE,2BAAF,CAVnB;AAYA,QAAIa,cAAc,GAAG,EAArB;;AAEA,QAAKC,MAAM,CAACC,SAAP,CAAiBC,OAAjB,KAA6BZ,SAAlC,EAA8C;AAC7CU,MAAAA,MAAM,CAACC,SAAP,CAAiBC,OAAjB,GAA2B,YAAW;AACrC,eAAO,IAAIC,MAAJ,CAAY,+GAAZ,EAA8HC,IAA9H,CAAoI,IAApI,CAAP;AACA,OAFD;AAGA;;AAED,UAAMC,WAAW,GAAG,YAAW;AAC9B,aAAOT,SAAS,CAACU,MAAV,GAAmB,CAA1B;AACA,KAFD;;AAIA,UAAMC,eAAe,GAAG,YAAW;AAClC,aAAOX,SAAS,CAACY,IAAV,CAAgB,sCAAhB,EAAyDC,GAAzD,EAAP;AACA,KAFD;;AAIA,UAAMC,UAAU,GAAG,YAAW;AAC7B,aAAOjB,aAAa,CAACe,IAAd,CAAoB,oDAApB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AAnE,CAA4E,OAA5E;AACA,KAFS,EAEP,GAFO,CAAV;AAGA,GAvTD;;AAyTArC,EAAAA,CAAC,CAAEwG,QAAF,CAAD,CAAcsB,KAAd,CAAqB,YAAW;AAC/B,QAAK,OAAOC,kBAAP,KAA8B,WAAnC,EAAiD;AAChD5H,MAAAA,EAAE,CAAC6H,SAAH,GAAe,IAAI3H,QAAJ,CAAc0H,kBAAd,CAAf;AACA;AACD,GAJD;AAKA,CA1UC,EA0UCE,MA1UD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/checkout.js"],"sourcesContent":["( function( $, settings ) {\n\t'use strict';\n\n\tif ( window.LP === undefined ) {\n\t\twindow.LP = {};\n\t}\n\n\t/**\n\t * Checkout\n\t *\n\t * @param options\n\t */\n\tconst Checkout = LP.Checkout = function( options ) {\n\t\tconst $formCheckout = $( '#learn-press-checkout-form' ),\n\n\t\t\t$formLogin = $( '#learn-press-checkout-login' ),\n\n\t\t\t$formRegister = $( '#learn-press-checkout-register' ),\n\n\t\t\t$payments = $( '.payment-methods' ),\n\n\t\t\t$buttonCheckout = $( '#learn-press-checkout-place-order' ),\n\n\t\t\t$checkoutEmail = $( 'input[name=\"guest_email\"]' );\n\n\t\tlet selectedMethod = '';\n\n\t\tif ( String.prototype.isEmail === undefined ) {\n\t\t\tString.prototype.isEmail = function() {\n\t\t\t\treturn new RegExp( '^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$' ).test( this );\n\t\t\t};\n\t\t}\n\n\t\tconst needPayment = function() {\n\t\t\treturn $payments.length > 0;\n\t\t};\n\n\t\tconst selectedPayment = function() {\n\t\t\treturn $payments.find( 'input[name=\"payment_method\"]:checked' ).val();\n\t\t};\n\n\t\tconst isLoggedIn = function() {\n\t\t\treturn $formCheckout.find( 'input[name=\"checkout-account-switch-form\"]:checked' ).length = 0;\n\t\t};\n\n\t\tconst getActiveFormData = function() {\n\t\t\tconst formName = $formCheckout.find( 'input[name=\"checkout-account-switch-form\"]:checked' ).val();\n\t\t\tconst $form = $( '#checkout-account-' + formName );\n\n\t\t\treturn $form.serializeJSON();\n\t\t};\n\n\t\tconst getPaymentData = function() {\n\t\t\treturn $( '#checkout-payment' ).serializeJSON();\n\t\t};\n\n\t\tconst getPaymentNote = function() {\n\t\t\treturn $( '.learn-press-checkout-comment' ).serializeJSON();\n\t\t};\n\n\t\tconst showErrors = function( errors ) {\n\t\t\tshowMessage( errors );\n\t\t\tconst firstId = Object.keys( errors )[ 0 ];\n\n\t\t\t$( 'input[name=\"' + firstId + '\"]:visible' ).trigger( 'focus' );\n\t\t};\n\n\t\tconst _formSubmit = function( e ) {\n\t\t\te.preventDefault();\n\n\t\t\tif ( needPayment() && ! selectedPayment() ) {\n\t\t\t\tshowMessage( 'Please select payment method', true );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlet formData = {};\n\n\t\t\tif ( ! isLoggedIn() ) {\n\t\t\t\tformData = $.extend( formData, getActiveFormData(), getPaymentNote() );\n\t\t\t}\n\n\t\t\tformData = $.extend( formData, getPaymentData() );\n\n\t\t\tremoveMessage();\n\n\t\t\tconst btnText = $buttonCheckout.text();\n\n\t\t\tconst urlHandle = new URL( options.ajaxurl );\n\t\t\turlHandle.searchParams.set( 'lp-ajax', 'checkout' );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: urlHandle,\n\t\t\t\tdataType: 'html',\n\t\t\t\tdata: formData,\n\t\t\t\ttype: 'POST',\n\t\t\t\tbeforeSend() {\n\t\t\t\t\t$( '#learn-press-checkout-place-order' ).addClass( 'loading' );\n\t\t\t\t\t$buttonCheckout.html( options.i18n_processing );\n\t\t\t\t},\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\n\t\t\t\t\tif ( response.messages ) {\n\t\t\t\t\t\tshowErrors( response.messages );\n\t\t\t\t\t} else if ( response.message ) {\n\t\t\t\t\t\tshowMessage( '<div class=\"learn-press-message error\">' + response.message + '</div>' );\n\t\t\t\t\t}\n\n\t\t\t\t\t$( '#learn-press-checkout-place-order' ).removeClass( 'loading' );\n\n\t\t\t\t\tif ( 'success' === response.result ) {\n\t\t\t\t\t\tif ( response.redirect && response.redirect.match( /https?/ ) ) {\n\t\t\t\t\t\t\t$buttonCheckout.html( options.i18n_redirecting );\n\t\t\t\t\t\t\twindow.location = response.redirect;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$buttonCheckout.html( btnText );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t$( '#learn-press-checkout-place-order' ).removeClass( 'loading' );\n\n\t\t\t\t\tshowMessage( '<div class=\"learn-press-message error\">' + errorThrown + '</div>' );\n\n\t\t\t\t\t$buttonCheckout.html( btnText );\n\n\t\t\t\t\tLP.unblockContent();\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\treturn false;\n\t\t};\n\n\t\tconst _selectPaymentChange = function() {\n\t\t\tconst id = $( this ).val(),\n\t\t\t\t$selected = $payments.children().filter( '.selected' ).removeClass( 'selected' ),\n\t\t\t\tbuttonText = $selected.find( '#payment_method_' + selectedMethod ).data( 'order_button_text' );\n\n\t\t\t$selected.find( '.payment-method-form' ).slideUp();\n\t\t\t$selected.end().filter( '#learn-press-payment-method-' + id ).addClass( 'selected' ).find( '.payment-method-form' ).hide().slideDown();\n\n\t\t\tselectedMethod = $selected.find( 'payment_method' ).val();\n\n\t\t\tif ( buttonText ) {\n\t\t\t\t$buttonCheckout.html( buttonText );\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Button to switch between mode login/register or place order\n\t\t * in case user is not logged in and guest checkout is enabled.\n\t\t */\n\t\tconst _guestCheckoutClick = function() {\n\t\t\tconst showOrHide = $formCheckout.toggle().is( ':visible' );\n\t\t\t$formLogin.toggle( ! showOrHide );\n\t\t\t$formRegister.toggle( ! showOrHide );\n\n\t\t\t$( '#learn-press-button-guest-checkout' ).toggle( ! showOrHide );\n\t\t};\n\n\t\t/**\n\t\t * Append messages into document.\n\t\t *\n\t\t * @param message\n\t\t * @param wrap\n\t\t */\n\t\tconst showMessage = function( message, wrap = false ) {\n\t\t\tremoveMessage();\n\n\t\t\tif ( $.isPlainObject( message ) ) {\n\t\t\t\tObject.keys( message ).reverse().forEach( ( id ) => {\n\t\t\t\t\tconst m = message[ id ];\n\t\t\t\t\tlet msg = Array.isArray( m ) ? m[ 0 ] : m;\n\t\t\t\t\tconst type = Array.isArray( m ) ? m[ 1 ] : '';\n\t\t\t\t\tmsg = '<div class=\"learn-press-message ' + ( typeof ( type ) === 'string' ? type : '' ) + '\">' + msg + '</div>';\n\t\t\t\t\t$formCheckout.prepend( msg );\n\t\t\t\t} );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( wrap ) {\n\t\t\t\tmessage = '<div class=\"learn-press-message ' + ( typeof ( wrap ) === 'string' ? wrap : '' ) + '\">' + message + '</div>';\n\t\t\t}\n\n\t\t\tif ( Array.isArray( message ) ) {\n\t\t\t\tmessage.map( ( msg ) => $formCheckout.prepend( '<div class=\"learn-press-message error\">' + msg + '</div>') );\n\t\t\t} else {\n\t\t\t\t$formCheckout.prepend( '<div class=\"learn-press-message error\">' + message + '</div>' );\n\t\t\t}\n\n\t\t\t$( 'html, body' ).animate( {\n\t\t\t\tscrollTop: ( $formCheckout.offset().top - 100 ),\n\t\t\t}, 1000 );\n\n\t\t\t$( document ).trigger( 'learn-press/checkout-error' );\n\t\t};\n\n\t\t/**\n\t\t * Callback function for guest email.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst _checkEmail = function() {\n\t\t\tif ( ! this.value.isEmail() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.timer && clearTimeout( this.timer );\n\n\t\t\t$checkoutEmail.addClass( 'loading' );\n\n\t\t\tthis.timer = setTimeout( function() {\n\t\t\t\t$.post( {\n\t\t\t\t\turl: window.location.href,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t'lp-ajax': 'checkout-user-email-exists',\n\t\t\t\t\t\temail: $checkoutEmail.val(),\n\t\t\t\t\t},\n\t\t\t\t\tsuccess( response ) {\n\t\t\t\t\t\tconst res = LP.parseJSON( response );\n\n\t\t\t\t\t\t$checkoutEmail.removeClass( 'loading' );\n\n\t\t\t\t\t\t$( '.lp-guest-checkout-output' ).remove();\n\n\t\t\t\t\t\tif ( res && res.output ) {\n\t\t\t\t\t\t\t$checkoutEmail.after( res.output );\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}, 500 );\n\t\t};\n\n\t\t/**\n\t\t * Remove all messages\n\t\t */\n\t\tconst removeMessage = function() {\n\t\t\t$( '.learn-press-error, .learn-press-notice, .learn-press-message' ).remove();\n\t\t};\n\n\t\t/**\n\t\t * Callback function for showing/hiding register form.\n\t\t *\n\t\t * @param e\n\t\t * @param toggle\n\t\t */\n\t\tconst _toggleRegisterForm = function( e, toggle ) {\n\t\t\ttoggle = $formRegister.find( '.learn-press-form-register' ).toggle( toggle ).is( ':visible' );\n\t\t\t$formRegister.find( '.checkout-form-register-toggle[data-toggle=\"show\"]' ).toggle( ! toggle );\n\n\t\t\te && ( e.preventDefault(), _toggleLoginForm( null, ! toggle ) );\n\t\t};\n\n\t\t/**\n\t\t * Callback function for showing/hiding login form.\n\t\t *\n\t\t * @param e {Event}\n\t\t * @param toggle {boolean}\n\t\t * @private\n\t\t */\n\t\tconst _toggleLoginForm = function( e, toggle ) {\n\t\t\ttoggle = $formLogin.find( '.learn-press-form-login' ).toggle( toggle ).is( ':visible' );\n\n\t\t\t$formLogin.find( '.checkout-form-login-toggle[data-toggle=\"show\"]' ).toggle( ! toggle );\n\n\t\t\te && ( e.preventDefault(), _toggleRegisterForm( null, ! toggle ) );\n\t\t};\n\n\t\t/**\n\t\t * Place order action\n\t\t */\n\t\t$buttonCheckout.on( 'click', function( e ) {\n\n\t\t} );\n\n\t\t$( '.lp-button-guest-checkout' ).on( 'click', _guestCheckoutClick );\n\t\t$( '#learn-press-button-cancel-guest-checkout' ).on( 'click', _guestCheckoutClick );\n\n\t\t$checkoutEmail.on( 'keyup changex', _checkEmail ).trigger( 'changex' );\n\t\t$payments.on( 'change select', 'input[name=\"payment_method\"]', _selectPaymentChange );\n\t\t$formCheckout.on( 'submit', _formSubmit );\n\t\t$payments.children( '.selected' ).find( 'input[name=\"payment_method\"]' ).trigger( 'select' );\n\t\t$formLogin.on( 'click', '.checkout-form-login-toggle', _toggleLoginForm );\n\t\t$formRegister.on( 'click', '.checkout-form-register-toggle', _toggleRegisterForm );\n\n\t\t$formRegister.find( 'input' ).each( function() {\n\t\t\tif ( ( -1 !== $.inArray( $( this ).attr( 'type' ).toLowerCase(), [ 'text', 'email', 'number' ] ) ) && $( this ).val() ) {\n\t\t\t\t_toggleRegisterForm();\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\t$formLogin.find( 'input:not([type=\"hidden\"])' ).each( function() {\n\t\t\tif ( ( -1 !== $.inArray( $( this ).attr( 'type' ).toLowerCase(), [ 'text', 'email', 'number' ] ) ) && $( this ).val() ) {\n\t\t\t\t_toggleLoginForm();\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\t// Show form if there is only one form Register or Login\n\t\tif ( $formRegister.length && ! $formLogin.length ) {\n\t\t\t_toggleRegisterForm();\n\t\t} else if ( ! $formRegister.length && $formLogin.length ) {\n\t\t\t_toggleLoginForm();\n\t\t}\n\n\t\t$formCheckout\n\t\t\t.on( 'change', 'input[name=\"checkout-account-switch-form\"]', function() {\n\t\t\t\t$( this ).next().find( 'input:not([type=\"hidden\"]):visible' ).first().trigger( 'focus' );\n\t\t\t} )\n\t\t\t.on( 'change', '#guest_email', function() {\n\t\t\t\t$formCheckout.find( '#reg_email' ).val( this.value );\n\t\t\t} )\n\t\t\t.on( 'change', '#reg_email', function() {\n\t\t\t\t$formCheckout.find( '#guest_email' ).val( this.value );\n\t\t\t} );\n\n\t\tsetTimeout( function() {\n\t\t\t$formCheckout.find( 'input:not([type=\"hidden\"]):visible' ).first().trigger( 'focus' );\n\t\t}, 300 );\n\t};\n\n\t$( document ).ready( function() {\n\t\tif ( typeof lpCheckoutSettings !== 'undefined' ) {\n\t\t\tLP.$checkout = new Checkout( lpCheckoutSettings );\n\t\t}\n\t} );\n}( jQuery ) );\n"],"names":["$","settings","window","LP","undefined","Checkout","options","$formCheckout","$formLogin","$formRegister","$payments","$buttonCheckout","$checkoutEmail","selectedMethod","String","prototype","isEmail","RegExp","test","needPayment","length","selectedPayment","find","val","isLoggedIn","getActiveFormData","formName","$form","serializeJSON","getPaymentData","getPaymentNote","showErrors","errors","showMessage","firstId","Object","keys","trigger","_formSubmit","e","preventDefault","formData","extend","removeMessage","btnText","text","urlHandle","URL","ajaxurl","searchParams","set","ajax","url","dataType","data","type","beforeSend","addClass","html","i18n_processing","success","response","parseJSON","messages","message","removeClass","result","redirect","match","i18n_redirecting","location","error","jqXHR","textStatus","errorThrown","unblockContent","_selectPaymentChange","id","$selected","children","filter","buttonText","slideUp","end","hide","slideDown","_guestCheckoutClick","showOrHide","toggle","is","wrap","isPlainObject","reverse","forEach","m","msg","Array","isArray","prepend","map","animate","scrollTop","offset","top","document","_checkEmail","value","timer","clearTimeout","setTimeout","post","href","email","res","remove","output","after","_toggleRegisterForm","_toggleLoginForm","on","each","inArray","attr","toLowerCase","next","first","ready","lpCheckoutSettings","$checkout","jQuery"],"sourceRoot":""}
assets/js/dist/frontend/checkout.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '8535b4d63257c44ba282');
assets/js/dist/frontend/courses.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '0b1c069ecceef5f57b52');
assets/js/dist/frontend/courses.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/courses.js CHANGED
@@ -10,8 +10,8 @@ let skeleton;
10
  let skeletonClone;
11
  let isLoading = false;
12
  let firstLoad = 1;
13
- let elNoLoadAjaxFirst = null;
14
- let elArchive = null;
15
 
16
  if (lpGlobalSettings.is_course_archive) {
17
  const queryString = window.location.search;
@@ -39,10 +39,10 @@ const lpArchiveCourse = () => {
39
 
40
  if (!elNoLoadAjaxFirst) {
41
  lpArchiveRequestCourse(filterCourses);
42
- } else {
43
- lpArchivePaginationCourse();
44
- lpArchiveSearchCourse();
45
  }
 
 
 
46
  };
47
 
48
  window.lpArchiveRequestCourse = (args, callBackSuccess) => {
10
  let skeletonClone;
11
  let isLoading = false;
12
  let firstLoad = 1;
13
+ let elNoLoadAjaxFirst;
14
+ let elArchive;
15
 
16
  if (lpGlobalSettings.is_course_archive) {
17
  const queryString = window.location.search;
39
 
40
  if (!elNoLoadAjaxFirst) {
41
  lpArchiveRequestCourse(filterCourses);
 
 
 
42
  }
43
+
44
+ lpArchivePaginationCourse();
45
+ lpArchiveSearchCourse();
46
  };
47
 
48
  window.lpArchiveRequestCourse = (args, callBackSuccess) => {
assets/js/dist/frontend/courses.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/courses.js","mappings":";;;;;AAAA,MAAMA,UAAU,GAAGC,gBAAgB,CAACC,WAAjB,IAAgC,EAAnD;AACA,MAAMC,UAAU,GAAGC,QAAQ,CAACC,QAAT,CAAkBC,IAArC;AACA,IAAIC,aAAa,GAAGC,IAAI,CAACC,KAAL,CAAYC,MAAM,CAACC,YAAP,CAAoBC,OAApB,CAA6B,mBAA7B,CAAZ,KAAoE,EAAxF;AACA,IAAIC,QAAJ;AACA,IAAIC,aAAJ;AACA,IAAIC,SAAS,GAAG,KAAhB;AACA,IAAIC,SAAS,GAAG,CAAhB;AACA,IAAIC,iBAAJ;AACA,IAAIC,SAAJ;;AAEA,IAAKjB,gBAA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AAQ,CAACzG,MAAT,GAAkB,CAAlB,IAAuByG,QAAQ,CAACjG,OAAT,CAAoBkG,OAAF,IAAeA,OAAO,CAACxC,gBAAR,CAA0B,QAA1B,EAAsCe,CAAF,IAAS;AACpGA,IAAAA,CAAC,CAACX,cAAF;AAEA,UAAM2B,MAAM,GAAGhB,CAAC,CAACV,MAAF,CAASC,KAAxB;;AAEA,QAAKyB,MAAL,EAAc;AACb,YAAMU,UAAU,GAAG7H,QAAQ,CAAC+B,aAAT,CAAwB,uDAAxB,CAAnB;AAEA8F,MAAAA,UAAU,KAAMA,UAAU,CAACC,OAAX,CAAmBX,MAAnB,GAA4BA,MAAlC,CAAV;AACAC,MAAAA,EAAE,CAACC,OAAH,CAAWxF,GAAX,CAAgB,gBAAhB,EAAkCsF,MAAlC;AACA;AACD,GAXuD,CAAjC,CAAvB;AAYA,CAfD;;AAiBA,SAASY,mBAAT,GAA+B;AAC9BjG,EAAAA,eAAe;AACf4F,EAAAA,6BAA6B;AAC7BR,EAAAA,uBAAuB;AACvB,EAED;AACA;AACA;;;AAEA,MAAMc,iBAAiB,GAAGC,WAAW,CAAE,YAAW;AACjD,MAAK,OAAOpI,gBAAgB,CAAC8C,iBAAxB,KAA8C,WAAnD,EAAiE;AAChE;AACA;;AAEDlC,EAAAA,QAAQ,GAAGT,QAAQ,CAAC+B,aAAT,CAAwB,6BAAxB,CAAX;AACAjB,EAAAA,SAAS,GAAGd,QAAQ,CAAC+B,aAAT,CAAwB,qBAAxB,CAAZ;;AAEA,MAAKjB,SAAS,IAAIL,QAAlB,EAA6B;AAC5BsH,IAAAA,mBAAmB;AACnBG,IAAAA,aAAa,CAAEF,iBAAF,CAAb;AACA;AACD,CAZoC,EAYlC,CAZkC,CAArC,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/courses.js"],"sourcesContent":["const urlCourses = lpGlobalSettings.courses_url || '';\nconst urlCurrent = document.location.href;\nlet filterCourses = JSON.parse( window.localStorage.getItem( 'lp_filter_courses' ) ) || {};\nlet skeleton;\nlet skeletonClone;\nlet isLoading = false;\nlet firstLoad = 1;\nlet elNoLoadAjaxFirst;\nlet elArchive;\n\nif ( lpGlobalSettings.is_course_archive ) {\n\tconst queryString = window.location.search;\n\n\tif ( ! queryString.length && urlCurrent.search( 'page' ) === -1 ) {\n\t\tfilterCourses = {};\n\t}\n}\n\nconst lpArchiveAddQueryArgs = ( endpoint, args ) => {\n\tconst url = new URL( endpoint );\n\n\tObject.keys( args ).forEach( ( arg ) => {\n\t\turl.searchParams.set( arg, args[ arg ] );\n\t} );\n\n\treturn url;\n};\n\nconst lpArchiveCourse = () => {\n\tskeleton = document.querySelector( '.lp-archive-course-skeleton' );\n\telNoLoadAjaxFirst = document.querySelector( '.no-first-load-ajax' );\n\n\tif ( ! skeleton ) {\n\t\treturn;\n\t}\n\n\tif ( ! elNoLoadAjaxFirst ) {\n\t\tlpArchiveRequestCourse( filterCourses );\n\t}\n\n\tlpArchivePaginationCourse();\n\tlpArchiveSearchCourse();\n};\n\nwindow.lpArchiveRequestCourse = ( args, callBackSuccess ) => {\n\tconst wpRestUrl = lpGlobalSettings.lp_rest_url;\n\n\tif ( ! wpRestUrl ) {\n\t\treturn;\n\t}\n\n\tif ( ! skeleton ) {\n\t\treturn;\n\t}\n\n\tconst archiveCourse = elArchive && elArchive.querySelector( 'div.lp-archive-courses .lp-content-area' );\n\tconst listCourse = archiveCourse && archiveCourse.querySelector( 'ul.learn-press-courses' );\n\n\tif ( ! listCourse ) {\n\t\treturn;\n\t}\n\n\tif ( isLoading ) {\n\t\treturn;\n\t}\n\n\tisLoading = true;\n\n\tif ( ! skeletonClone ) {\n\t\tskeletonClone = skeleton.outerHTML;\n\t} else {\n\t\tlistCourse.append( skeleton );\n\t\t// return;\n\t}\n\n\tconst urlCourseArchive = lpArchiveAddQueryArgs( wpRestUrl + 'lp/v1/courses/archive-course', { ...lpGlobalSettings.lpArchiveSkeleton, ...args } );\n\tconst url = lpGlobalSettings.lp_rest_url + 'lp/v1/courses/archive-course' + urlCourseArchive.search;\n\n\tfetch( url, {\n\t\tmethod: 'GET',\n\t} )\n\t\t.then( ( response ) => response.json() )\n\t\t.then( ( response ) => {\n\t\t\tif ( typeof response.data.content !== 'undefined' && listCourse ) {\n\t\t\t\tlistCourse.innerHTML = response.data.content || '';\n\t\t\t}\n\n\t\t\tconst pagination = response.data.pagination;\n\n\t\t\t// lpArchiveSearchCourse();\n\n\t\t\tconst paginationEle = document.querySelector( '.learn-press-pagination' );\n\t\t\tif ( paginationEle ) {\n\t\t\t\tpaginationEle.remove();\n\t\t\t}\n\n\t\t\tif ( typeof pagination !== 'undefined' ) {\n\t\t\t\tconst paginationHTML = new DOMParser().parseFromString( pagination, 'text/html' );\n\t\t\t\tconst paginationNewNode = paginationHTML.querySelector( '.learn-press-pagination' );\n\t\t\t\t//const paginationInnerHTML = paginationSelector && paginationSelector.innerHTML;\n\n\t\t\t\tif ( paginationNewNode ) {\n\t\t\t\t\tlistCourse.after( paginationNewNode );\n\t\t\t\t\tlpArchivePaginationCourse();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twp.hooks.doAction( 'lp-js-get-courses', response );\n\n\t\t\tif ( typeof callBackSuccess === 'function' ) {\n\t\t\t\tcallBackSuccess( response );\n\t\t\t}\n\t\t} ).catch( ( error ) => {\n\t\t\tlistCourse.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message || 'Error: Query lp/v1/courses/archive-course' }</div>`;\n\t\t\tconsole.log( error );\n\t\t} ).finally( () => {\n\t\t\tisLoading = false;\n\t\t\t// skeleton && skeleton.remove();\n\n\t\t\tjQuery( 'form.search-courses button' ).removeClass( 'loading' );\n\n\t\t\tif ( ! firstLoad ) {\n\t\t\t// Scroll to archive element\n\t\t\t\tconst optionScroll = { behavior: 'smooth' };\n\t\t\t\telArchive.scrollIntoView( optionScroll );\n\t\t\t} else {\n\t\t\t\tfirstLoad = 0;\n\t\t\t}\n\n\t\t\t// Save filter courses to Storage\n\t\t\twindow.localStorage.setItem( 'lp_filter_courses', JSON.stringify( args ) );\n\t\t\t// Change url by params filter courses\n\t\t\tconst urlPush = lpArchiveAddQueryArgs( document.location, args );\n\t\t\twindow.history.pushState( '', '', urlPush );\n\t\t} );\n};\n\nconst lpArchiveSearchCourse = () => {\n\tconst searchForm = document.querySelectorAll( 'form.search-courses' );\n\tconst filterCourses = JSON.parse( window.localStorage.getItem( 'lp_filter_courses' ) ) || {};\n\n\tsearchForm.forEach( ( s ) => {\n\t\tconst search = s.querySelector( 'input[name=\"c_search\"]' );\n\t\tconst btn = s.querySelector( '[type=\"submit\"]' );\n\t\tlet timeOutSearch;\n\n\t\tsearch.addEventListener( 'keyup', ( event ) => {\n\t\t\tif ( skeleton ) {\n\t\t\t\tskeleton.style.display = 'block';\n\t\t\t}\n\t\t\tevent.preventDefault();\n\n\t\t\tconst s = event.target.value.trim();\n\n\t\t\tif ( ! s || ( s && s.length > 2 ) ) {\n\t\t\t\tif ( undefined !== timeOutSearch ) {\n\t\t\t\t\tclearTimeout( timeOutSearch );\n\t\t\t\t}\n\n\t\t\t\ttimeOutSearch = setTimeout( function() {\n\t\t\t\t\tbtn.classList.add( 'loading' );\n\n\t\t\t\t\tfilterCourses.c_search = s;\n\t\t\t\t\tfilterCourses.paged = 1;\n\n\t\t\t\t\tlpArchiveRequestCourse( { ...filterCourses } );\n\t\t\t\t}, 800 );\n\t\t\t}\n\t\t} );\n\n\t\ts.addEventListener( 'submit', ( e ) => {\n\t\t\te.preventDefault();\n\n\t\t\tconst eleSearch = s.querySelector( 'input[name=\"c_search\"]' );\n\t\t\teleSearch && eleSearch.dispatchEvent( new Event( 'keyup' ) );\n\t\t} );\n\t} );\n};\n\nconst lpArchivePaginationCourse = () => {\n\tconst paginationEle = document.querySelectorAll( '.lp-archive-courses .learn-press-pagination .page-numbers' );\n\n\tpaginationEle.length > 0 && paginationEle.forEach( ( ele ) => ele.addEventListener( 'click', ( event ) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tif ( ! elArchive ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( skeleton ) {\n\t\t\tskeleton.style.display = 'block';\n\t\t}\n\n\t\t// Scroll to archive element\n\t\telArchive.scrollIntoView( { behavior: 'smooth' } );\n\n\t\tlet filterCourses = {};\n\t\tfilterCourses = JSON.parse( window.localStorage.getItem( 'lp_filter_courses' ) ) || {};\n\n\t\tconst urlString = event.currentTarget.getAttribute( 'href' );\n\n\t\tif ( urlString ) {\n\t\t\tconst current = [ ...paginationEle ].filter( ( el ) => el.classList.contains( 'current' ) );\n\t\t\tconst paged = event.currentTarget.textContent || ( ele.classList.contains( 'next' ) && parseInt( current[ 0 ].textContent ) + 1 ) || ( ele.classList.contains( 'prev' ) && parseInt( current[ 0 ].textContent ) - 1 );\n\t\t\tfilterCourses.paged = paged;\n\n\t\t\tlpArchiveRequestCourse( { ...filterCourses } );\n\t\t}\n\t} ) );\n};\n\nconst lpArchiveGridListCourse = () => {\n\tconst layout = LP.Cookies.get( 'courses-layout' );\n\n\tconst switches = document.querySelectorAll( '.lp-courses-bar .switch-layout [name=\"lp-switch-layout-btn\"]' );\n\n\tswitches.length > 0 && [ ...switches ].map( ( ele ) => ele.value === layout && ( ele.checked = true ) );\n};\n\nconst lpArchiveGridListCourseHandle = () => {\n\tconst gridList = document.querySelectorAll( '.lp-archive-courses input[name=\"lp-switch-layout-btn\"]' );\n\n\tgridList.length > 0 && gridList.forEach( ( element ) => element.addEventListener( 'change', ( e ) => {\n\t\te.preventDefault();\n\n\t\tconst layout = e.target.value;\n\n\t\tif ( layout ) {\n\t\t\tconst dataLayout = document.querySelector( '.lp-archive-courses .learn-press-courses[data-layout]' );\n\n\t\t\tdataLayout && ( dataLayout.dataset.layout = layout );\n\t\t\tLP.Cookies.set( 'courses-layout', layout );\n\t\t}\n\t} ) );\n};\n\nfunction LPArchiveCourseInit() {\n\tlpArchiveCourse();\n\tlpArchiveGridListCourseHandle();\n\tlpArchiveGridListCourse();\n}\n\n// document.addEventListener( 'DOMContentLoaded', function( event ) {\n// \tLPArchiveCourseInit();\n// } );\n\nconst detectedElArchive = setInterval( function() {\n\tif ( typeof lpGlobalSettings.lpArchiveSkeleton === 'undefined' ) {\n\t\treturn;\n\t}\n\n\tskeleton = document.querySelector( '.lp-archive-course-skeleton' );\n\telArchive = document.querySelector( '.lp-archive-courses' );\n\n\tif ( elArchive && skeleton ) {\n\t\tLPArchiveCourseInit();\n\t\tclearInterval( detectedElArchive );\n\t}\n}, 1 );\n"],"names":["urlCourses","lpGlobalSettings","courses_url","urlCurrent","document","location","href","filterCourses","JSON","parse","window","localStorage","getItem","skeleton","skeletonClone","isLoading","firstLoad","elNoLoadAjaxFirst","elArchive","is_course_archive","queryString","search","length","lpArchiveAddQueryArgs","endpoint","args","url","URL","Object","keys","forEach","arg","searchParams","set","lpArchiveCourse","querySelector","lpArchiveRequestCourse","lpArchivePaginationCourse","lpArchiveSearchCourse","callBackSuccess","wpRestUrl","lp_rest_url","archiveCourse","listCourse","outerHTML","append","urlCourseArchive","lpArchiveSkeleton","fetch","method","then","response","json","data","content","innerHTML","pagination","paginationEle","remove","paginationHTML","DOMParser","parseFromString","paginationNewNode","after","wp","hooks","doAction","catch","error","message","console","log","finally","jQuery","removeClass","optionScroll","behavior","scrollIntoView","setItem","stringify","urlPush","history","pushState","searchForm","querySelectorAll","s","btn","timeOutSearch","addEventListener","event","style","display","preventDefault","target","value","trim","undefined","clearTimeout","setTimeout","classList","add","c_search","paged","e","eleSearch","dispatchEvent","Event","ele","stopPropagation","urlString","currentTarget","getAttribute","current","filter","el","contains","textContent","parseInt","lpArchiveGridListCourse","layout","LP","Cookies","get","switches","map","checked","lpArchiveGridListCourseHandle","gridList","element","dataLayout","dataset","LPArchiveCourseInit","detectedElArchive","setInterval","clearInterval"],"sourceRoot":""}
assets/js/dist/frontend/courses.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'f698d47d3ab2b90e5eb8');
assets/js/dist/frontend/courses.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/custom.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '0ee52a4e18c91552fb50');
assets/js/dist/frontend/custom.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/custom.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/custom.js","mappings":";;;;;AAAA;AACA;AACA;AAEA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,EAAjB;AAEA,MAAMC,CAAC,GAAGC,MAAM,CAACC,MAAP,IAAiBA,MAA3B;AAEAJ,IAAI,CAACK,SAAL,CAAgB,iBAAhB,EAAmC,UAAUC,MAAV,EAAmB;AACrD,SAAOA,MAAP,CADqD,CACtC;AACf,CAFD;AAIAN,IAAI,CAACO,SAAL,CAAgB,mBAAhB,EAAqC,YAAW,CAC/C,CADD;AAGAP,IAAI,CAACO,SAAL,CAAgB,cAAhB,EAAgC,UAAUC,OAAV,EAAmBC,EAAnB,EAAwB;AACvDP,EAAAA,CAAC,CAAG,gBAAgBO,EAAI,EAAvB,CAAD,CAA4BC,WAA5B,CAAyC,gCAAzC,EAA4EC,QAA5E,CAAsF,2BAAtF;;AAEAR,EAAAA,MAAM,CAACS,cAAP,GAAwB,YAAW;AAClC,WAAO,UAAP;AACA,GAFD;AAGA,CAND;AAQAZ,IAAI,CAACO,SAAL,CAAgB,gBAAhB,EAAkC,UAAUM,QAAV,EAAoBJ,EAApB,EAAyB;AAC1DP,EAAAA,CAAC,CAAG,gBAAgBO,EAAI,EAAvB,CAAD,CAA4BC,WAA5B,CAAyC,8BAAzC,EAA0EC,QAA1E,CAAqF,+BAA+BE,QAAQ,CAACL,OAAT,CAAiBM,UAAY,EAAjJ;AACAX,EAAAA,MAAM,CAACS,cAAP,GAAwB,IAAxB;AACA,CAHD,E","sources":["webpack://learnpress/./assets/src/apps/js/frontend/custom.js"],"sourcesContent":["/**\n * Custom functions for frontend quiz.\n */\n\nconst { Hook } = LP;\n\nconst $ = window.jQuery || jQuery;\n\nHook.addFilter( 'question-blocks', function( blocks ) {\n\treturn blocks; ///[ 'answer-options', 'title', 'content', 'hint', 'explanation'];\n} );\n\nHook.addAction( 'before-start-quiz', function() {\n} );\n\nHook.addAction( 'quiz-started', function( results, id ) {\n\t$( `.course-item-${ id }` ).removeClass( 'status-completed failed passed' ).addClass( 'has-status status-started' );\n\n\twindow.onbeforeunload = function() {\n\t\treturn 'Warning!';\n\t};\n} );\n\nHook.addAction( 'quiz-submitted', function( response, id ) {\n\t$( `.course-item-${ id }` ).removeClass( 'status-started passed failed' ).addClass( `has-status status-completed ${ response.results.graduation }` );\n\twindow.onbeforeunload = null;\n} );\n"],"names":["Hook","LP","$","window","jQuery","addFilter","blocks","addAction","results","id","removeClass","addClass","onbeforeunload","response","graduation"],"sourceRoot":""}
assets/js/dist/frontend/custom.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '000802e7005fe63c7846');
assets/js/dist/frontend/custom.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lesson.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '0677aa8c0984d1567565');
assets/js/dist/frontend/lesson.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lesson.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack://LP.[name]/webpack/bootstrap"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA","file":"frontend/lesson.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./assets/src/apps/js/frontend/lesson.js\");\n"],"sourceRoot":""}
assets/js/dist/frontend/lesson.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'dd4d6723e70b4d227f83');
assets/js/dist/frontend/lesson.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lp-configs.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '5f6881ea352f729a0340');
assets/js/dist/frontend/lp-configs.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lp-configs.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/lp-configs.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;W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,eAAe,GAAG,UAAUC,IAAV,EAAiB;AAC/C,QAAMC,CAAC,GAAGpB,EAAE,CAACD,IAAH,CAAQgB,YAAR,CAAsB,mBAAtB,EAA2CP,gBAA3C,CAAV;AAEA,SAAOW,IAAI,IAAIC,CAAC,CAAED,IAAF,CAAT,GAAoBC,CAAC,CAAED,IAAF,CAArB,GAAgC,YAAW;AACjD,WAAO,EAAP;AACA,GAFD;AAGA,CANM;AAQA,MAAME,eAAe,GAAG,YAAW;AACzC,QAAMC,MAAM,GAAGvB,IAAI,CAACgB,YAAL,CAAmB,mBAAnB,EAAwC;AACtDQ,IAAAA,IAAI,EAAE,IADgD;AAEtDC,IAAAA,WAAW,EAAE,IAFyC;AAGtDC,IAAAA,MAAM,EAAE;AAH8C,GAAxC,CAAf;AAKA,CANM,C","sources":["webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/lp-configs.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const { Hook } = LP;\n\nexport const classNames = {\n\tQuiz: {\n\t\tResult: [ 'quiz-result' ],\n\t\tContent: [ 'quiz-content' ],\n\t\tQuestions: [ 'quiz-questions' ],\n\t\tButtons: [ 'quiz-buttons' ],\n\t\tAttempts: [ 'quiz-attempts' ],\n\t},\n};\n\nconst questionCheckers = {\n\tsingle_choice() {\n\n\t},\n\n\tmulti_choice() {\n\n\t},\n\n\ttrue_or_false() {\n\n\t},\n};\n\nexport const isQuestionCorrect = {\n\tfill_in_blank() {\n\t\treturn true;\n\t},\n};\n\n/**\n * Question blocks.\n *\n * Allow to sort the blocks of question\n */\nexport const questionBlocks = function() {\n\treturn LP.Hook.applyFilters( 'question-blocks', [ 'title', 'content', 'answer-options', 'explanation', 'hint', 'buttons' ] );\n};\n\nexport const questionFooterButtons = function() {\n\treturn LP.Hook.applyFilters( 'question-footer-buttons', [ 'instant-check' ] );\n};\n\nexport const questionTitleParts = function() {\n\treturn LP.Hook.applyFilters( 'question-title-parts', [ 'index', 'title', 'hint', 'edit-permalink' ] );\n};\n\nexport const questionChecker = function( type ) {\n\tconst c = LP.Hook.applyFilters( 'question-checkers', questionCheckers );\n\n\treturn type && c[ type ] ? c[ type ] : function() {\n\t\treturn {};\n\t};\n};\n\nexport const quizStartBlocks = function() {\n\tconst blocks = Hook.applyFilters( 'quiz-start-blocks', {\n\t\tmeta: true,\n\t\tdescription: true,\n\t\tcustom: 'Hello',\n\t} );\n};\n"],"names":["Hook","LP","classNames","Quiz","Result","Content","Questions","Buttons","Attempts","questionCheckers","single_choice","multi_choice","true_or_false","isQuestionCorrect","fill_in_blank","questionBlocks","applyFilters","questionFooterButtons","questionTitleParts","questionChecker","type","c","quizStartBlocks","blocks","meta","description","custom"],"sourceRoot":""}
assets/js/dist/frontend/lp-configs.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '2c724a34e57939f1da12');
assets/js/dist/frontend/lp-configs.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/modal.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b77718c7c65ccd14d0a4');
assets/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Ae;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNA;AAEA,+DAAeJ,oDAAf,E","sources":["webpack://learnpress/./assets/src/apps/js/frontend/modal/index.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/actions.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/index.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/middlewares.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/reducer.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/selectors.js","webpack://learnpress/./node_modules/refx/refx.js","webpack://learnpress/external window [\"wp\",\"data\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/modal.js"],"sourcesContent":["/**\n * Create Modal popup.\n * Edit: Use React Hook.\n *\n * @author Nhamdv - ThimPress.\n */\n\nimport store from './store';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, dispatch } from '@wordpress/data';\n\nconst Modal = ( { children } ) => {\n\tconst { show, hide, confirm } = dispatch( 'learnpress/modal' );\n\n\tconst isShow = useSelect( ( select ) => {\n\t\tconst isOpen = select( 'learnpress/modal' ).isOpen();\n\t\treturn isOpen;\n\t} );\n\n\tconst message = useSelect( ( select ) => {\n\t\tconst getMessage = select( 'learnpress/modal' ).getMessage();\n\t\treturn getMessage;\n\t} );\n\n\tconst dataConfirm = ( c ) => ( event ) => {\n\t\tconfirm( c );\n\t};\n\n\tconst styles = {\n\t\tdisplay: isShow ? 'block' : 'none',\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div>\n\t\t\t\t<div id=\"lp-modal-overlay\" style={ styles }></div>\n\t\t\t\t<div id=\"lp-modal-window\" style={ styles }>\n\t\t\t\t\t<div id=\"lp-modal-content\" dangerouslySetInnerHTML={ { __html: message } }></div>\n\t\t\t\t\t<div id=\"lp-modal-buttons\">\n\t\t\t\t\t\t<button className=\"lp-button modal-button-ok\" onClick={ dataConfirm( 'yes' ) }>\n\t\t\t\t\t\t\t<span>{ __( 'OK', 'learnpress' ) }</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button className=\"lp-button modal-button-cancel\" onClick={ dataConfirm( 'no' ) }>\n\t\t\t\t\t\t\t<span>{ __( 'Cancel', 'learnpress' ) }</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ children }\n\t\t</>\n\t);\n};\n\nexport default Modal;\n","export function show( message, cb ) {\n\treturn {\n\t\ttype: 'SHOW_MODAL',\n\t\tmessage,\n\t\tcb,\n\t};\n}\n\nexport function hide() {\n\treturn {\n\t\ttype: 'HIDE_MODAL',\n\t};\n}\n\nexport function confirm( value ) {\n\treturn {\n\t\ttype: 'CONFIRM',\n\t\tvalue,\n\t};\n}\n","import { registerStore } from '@wordpress/data';\n\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport applyMiddlewares from './middlewares';\n\nconst { controls: dataControls } = LP.dataControls;\n\nconst store = registerStore( 'learnpress/modal', {\n\treducer,\n\tselectors,\n\tactions,\n\tcontrols: {\n\t\t...dataControls,\n\t},\n} );\n\napplyMiddlewares( store );\n\nexport default store;\n","/**\n * External dependencies\n */\nimport refx from 'refx';\n\nconst effects = {\n\tENROLL_COURSE_X: ( action, store ) => {\n\t\tenrollCourse: ( action, store ) => {\n\t\t\tconst { dispatch } = store;\n\n\t\t\t//dispatch()\n\t\t};\n\t},\n};\n\n/**\n * Applies the custom middlewares used specifically in the editor module.\n *\n * @param {Object} store Store Object.\n *\n * @return {Object} Update Store Object.\n */\nfunction applyMiddlewares( store ) {\n\tlet enhancedDispatch = () => {\n\t\tthrow new Error(\n\t\t\t'Dispatching while constructing your middleware is not allowed. ' +\n\t\t\t\t'Other middleware would not be applied to this dispatch.'\n\t\t);\n\t};\n\n\tconst middlewareAPI = {\n\t\tgetState: store.getState,\n\t\tdispatch: ( ...args ) => enhancedDispatch( ...args ),\n\t};\n\n\tenhancedDispatch = refx( effects )( middlewareAPI )( store.dispatch );\n\n\tstore.dispatch = enhancedDispatch;\n\treturn store;\n}\n\nexport default applyMiddlewares;\n","const STORE_DATA = {};\n\nexport const Modal = ( state = STORE_DATA, action ) => {\n\tswitch ( action.type ) {\n\tcase 'SHOW_MODAL':\n\t\treturn {\n\t\t\t...state,\n\t\t\tisOpen: true,\n\t\t\tmessage: action.message,\n\t\t\tcb: action.cb,\n\t\t};\n\tcase 'HIDE_MODAL':\n\t\treturn {\n\t\t\t...state,\n\t\t\tisOpen: false,\n\t\t\tmessage: false,\n\t\t\tcb: null,\n\t\t};\n\tcase 'CONFIRM':\n\t\tstate.cb &&\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\tstate.cb();\n\t\t\t\t}, 10 );\n\n\t\treturn {\n\t\t\t...state,\n\t\t\tconfirm: action.value,\n\t\t};\n\t}\n\treturn state;\n};\n\nexport default Modal;\n","import { dispatch } from '@wordpress/data';\n\nexport function isOpen( state ) {\n\treturn state.isOpen;\n}\n\nexport function getMessage( state ) {\n\treturn state.message;\n}\n\nexport function confirm( state, message, cb ) {\n\tconst { show, hide } = dispatch( 'learnpress/modal' );\n\n\tif ( ! state.message ) {\n\t\tshow( message, cb );\n\t} else {\n\t\thide();\n\t\treturn state.confirm;\n\t}\n\n\treturn 'no';\n}\n","'use strict';\n\nfunction flattenIntoMap( map, effects ) {\n\tvar i;\n\tif ( Array.isArray( effects ) ) {\n\t\tfor ( i = 0; i < effects.length; i++ ) {\n\t\t\tflattenIntoMap( map, effects[ i ] );\n\t\t}\n\t} else {\n\t\tfor ( i in effects ) {\n\t\t\tmap[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );\n\t\t}\n\t}\n}\n\nfunction refx( effects ) {\n\tvar map = {},\n\t\tmiddleware;\n\n\tflattenIntoMap( map, effects );\n\n\tmiddleware = function( store ) {\n\t\treturn function( next ) {\n\t\t\treturn function( action ) {\n\t\t\t\tvar handlers = map[ action.type ],\n\t\t\t\t\tresult = next( action ),\n\t\t\t\t\ti, handlerAction;\n\n\t\t\t\tif ( handlers ) {\n\t\t\t\t\tfor ( i = 0; i < handlers.length; i++ ) {\n\t\t\t\t\t\thandlerAction = handlers[ i ]( action, store );\n\t\t\t\t\t\tif ( handlerAction ) {\n\t\t\t\t\t\t\tstore.dispatch( handlerAction );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t};\n\t\t};\n\t};\n\n\tmiddleware.effects = map;\n\n\treturn middleware;\n}\n\nmodule.exports = refx;\n","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Modal from './modal/index';\n\nexport default Modal;\n"],"names":["store","__","useSelect","dispatch","Modal","children","show","hide","confirm","isShow","select","isOpen","message","getMessage","dataConfirm","c","event","styles","display","__html","cb","type","value","registerStore","reducer","actions","selectors","applyMiddlewares","controls","dataControls","LP","refx","effects","ENROLL_COURSE_X","action","enrollCourse","enhancedDispatch","Error","middlewareAPI","getState","STORE_DATA","state","setTimeout"],"sourceRoot":""}
assets/js/dist/frontend/modal.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-data', 'wp-element', 'wp-i18n'), 'version' => '56b29fd7370c209c0daa');
assets/js/dist/frontend/modal.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/profile.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '520ee0771c22cfedf02f');
assets/js/dist/frontend/profile.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["react"]
assets/js/dist/frontend/profile.js CHANGED
@@ -157,9 +157,9 @@ function Avatar() {
157
  let error = '';
158
 
159
  if (parseInt(fileUpload.size) > 2097152) {
160
- error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('File size too large. You need to upload a file < 2MB', 'learnpress');
161
  } else if (img.naturalWidth < width || img.naturalHeight < height) {
162
- error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Image size must be greater than or equal to %1$sx%2$spx', 'learnpress'), width, height);
163
  }
164
 
165
  if (error) {
157
  let error = '';
158
 
159
  if (parseInt(fileUpload.size) > 2097152) {
160
+ error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('The file size is too large. You need to upload a file < 2MB.', 'learnpress');
161
  } else if (img.naturalWidth < width || img.naturalHeight < height) {
162
+ error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('The image size must be greater than or equal to %1$sx%2$spx', 'learnpress'), width, height);
163
  }
164
 
165
  if (error) {
assets/js/dist/frontend/profile.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/profile.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEe,SAASQ,MAAT,GAAkB;AAChC,QAAM,CAAEC,IAAF,EAAQC,OAAR,IAAoBV,4DAAQ,EAAlC;AACA,QAAM,CAAEW,KAAF,EAASC,QAAT,IAAsBZ,4DAAQ,CAAE,CAAF,CAApC;AACA,QAAM,CAAEa,MAAF,EAAUC,SAAV,IAAwBd,4DAAQ,CAAE,CAAF,CAAtC;AACA,QAAM,CAAEe,IAAF,EAAQC,OAAR,IAAoBhB,4DAAQ,CAAE;AAAEiB,IAAAA,CAAC,EAAE,CAAL;AAAQC,IAAAA,CAAC,EAAE;AAAX,GAAF,CAAlC;AACA,QAAM,CAAEC,QAAF,EAAYC,WAAZ,IAA4BpB,4DAAQ,CAAE,CAAF,CAA1C;AACA,QAAM,CAAEqB,iBAAF,EAAqBC,oBAArB,IAA8CtB,4DAAQ,CAAE,IAAF,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AW;AACrB0H,MAAAA,OAAO,CAACC,GAAR,CAAa3H,GAAb,EADqB,CAErB;AACA,KAZD;AAaA,GAdD;;AAgBA,QAAM4H,cAAc,GAAGvI,QAAQ,CAACyE,aAAT,CAAwB,4CAAxB,CAAvB;;AACA,MAAK,CAAE8D,cAAP,EAAwB;AACvB;AACA;;AAED,QAAMzJ,IAAI,GAAG4G,IAAI,CAACC,KAAL,CAAY4C,cAAc,CAAC3C,KAA3B,CAAb;AAEA1B,EAAAA,WAAW,CAAEF,QAAF,EAAYlF,IAAZ,CAAX;AACA,CA/BD;;AAgCA,+DAAesJ,gBAAf;;;;;;;;;;ACnCA,2HAAmD;;;;;;;;;;;;ACAnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA,iBAAiB;AACjB,+BAA+B;AAC/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,2BAA2B,mBAAO,CAAC,0FAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,2BAA2B,mBAAO,CAAC,0FAAwB;;AAE3D,uBAAuB,mBAAO,CAAC,kFAAoB;;;AAGnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;;AAE5B;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,2BAA2B;AAC3B,2BAA2B;;AAE3B;AACA,yCAAyC;AACzC;AACA;AACA,MAAM,mCAAmC;AACzC;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB,mBAAmB;;AAEnB,WAAW;AACX;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;ACpL4C;AAClB;AACmB;;AAE7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,iBAAiB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;;AAGA;AACA;AACA,oGAAoG;AACpG;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,+FAA+F;AAC/F;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA,0BAA0B,+CAAQ,CAAC,+CAAQ,GAAG;AAC9C;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,+EAA+E;;AAE/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,uBAAuB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,0CAA0C,uBAAuB,WAAW,YAAY,aAAa,cAAc,qBAAqB,sBAAsB,uBAAuB,iBAAiB,kBAAkB,4BAA4B,wBAAwB,GAAG,iDAAiD,4BAA4B,6EAA6E,4BAA4B,oBAAoB,qBAAqB,iBAAiB,uBAAuB,WAAW,cAAc,YAAY,aAAa,GAAG,mCAAmC,gBAAgB,iBAAiB,GAAG,iCAAiC,gBAAgB,iBAAiB,GAAG,6BAA6B,uBAAuB,cAAc,aAAa,qCAAqC,+CAA+C,2BAA2B,6BAA6B,8BAA8B,qBAAqB,GAAG,kCAAkC,uBAAuB,GAAG,yCAAyC,iBAAiB,2BAA2B,uBAAuB,+CAA+C,WAAW,cAAc,iBAAiB,kBAAkB,kBAAkB,qBAAqB,GAAG,wCAAwC,iBAAiB,2BAA2B,uBAAuB,+CAA+C,gBAAgB,mBAAmB,YAAY,aAAa,mBAAmB,oBAAoB,GAAG;;AAEriD;AACA;;AAEA;AACA;AACA;AACA,EAAE,gDAAS;;AAEX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,+CAAQ,CAAC,+CAAQ,GAAG;AAC9C;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,GAAG;;AAEV;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+CAAQ,GAAG;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,sDAAc;AACjC;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;;;AAGR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAAmB;AAC3C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,uBAAuB,0DAAmB,QAAQ,+CAAQ;AAC/D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,aAAa,+CAAQ,CAAC,+CAAQ,GAAG;AACjC;AACA,OAAO;AACP;AACA,KAAK,2BAA2B,0DAAmB,UAAU,+CAAQ;AACrE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA,aAAa,+CAAQ,CAAC,+CAAQ,GAAG;AACjC;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA,KAAK;AACL,0BAA0B,0DAAmB,WAAW,+CAAQ;AAChE;AACA,OAAO;AACP,KAAK,wCAAwC,0DAAmB;AAChE,aAAa,+CAAQ,CAAC,+CAAQ,GAAG;AACjC;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,eAAe;AACf,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wDAAe;;AAEjB,+DAAe,OAAO,EAAC;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACt0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;AAC1B;AACA;AACA;AACO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACO;AACP;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACO;AACP,oCAAoC;AACpC;AACA;AACO;AACP;AACA;AACA;AACO;AACP,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACO;AACP,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACO;AACP;AACA,mCAAmC,oCAAoC,gBAAgB;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA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;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AAEApI,QAAQ,CAACT,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUiJ,KAAV,EAAkB;AAChEzE,EAAAA,+DAAS;AACTqE,EAAAA,8DAAgB;AAChBpB,EAAAA,kEAAY;AACZ,CAJD;;AAMA,IAAKhH,QAAQ,CAACyI,cAAT,CAAyB,0BAAzB,CAAL,EAA6D;AAC5DlE,EAAAA,EAAE,CAACqC,OAAH,CAAW8B,MAAX,CAAmB,kEAAC,uDAAD,OAAnB,EAA+B1I,QAAQ,CAACyI,cAAT,CAAyB,0BAAzB,CAA/B;AACA,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/profile/avatar.js","webpack://learnpress/./assets/src/apps/js/frontend/profile/course-tab.js","webpack://learnpress/./assets/src/apps/js/frontend/profile/order-recover.js","webpack://learnpress/./assets/src/apps/js/frontend/profile/statistic.js","webpack://learnpress/./node_modules/normalize-wheel/index.js","webpack://learnpress/./node_modules/normalize-wheel/src/ExecutionEnvironment.js","webpack://learnpress/./node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js","webpack://learnpress/./node_modules/normalize-wheel/src/isEventSupported.js","webpack://learnpress/./node_modules/normalize-wheel/src/normalizeWheel.js","webpack://learnpress/./node_modules/react-easy-crop/index.module.js","webpack://learnpress/./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js","webpack://learnpress/external window \"React\"","webpack://learnpress/external window [\"wp\",\"apiFetch\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/external window [\"wp\",\"url\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/profile.js"],"sourcesContent":["import { useState, useCallback, useEffect, useRef } from '@wordpress/element';\nimport apiFetch from '@wordpress/api-fetch';\nimport { __, sprintf } from '@wordpress/i18n';\nimport Cropper from 'react-easy-crop';\n\nexport default function Avatar() {\n\tconst [ file, setFile ] = useState();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\tconst [ crop, setCrop ] = useState( { x: 0, y: 0 } );\n\tconst [ rotation, setRotation ] = useState( 0 );\n\tconst [ croppedAreaPixels, setCroppedAreaPixels ] = useState( null );\n\tconst [ naturalWidth, setNaturalWidth ] = useState( 0 );\n\tconst [ naturalHeight, setNaturalHeight ] = useState( 0 );\n\tconst [ loading, setLoading ] = useState( false );\n\tconst [ skeleton, setSkeleton ] = useState( true );\n\tconst [ uploadError, setUploadError ] = useState( '' );\n\tconst [ notice, setNotice ] = useState( {\n\t\ttype: '',\n\t\tmessage: '',\n\t} );\n\n\tconst fileInput = useRef();\n\n\tuseEffect( () => {\n\t\tasync function getAvatar() {\n\t\t\tsetSkeleton( true );\n\t\t\ttry {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\tpath: 'lp/v1/profile/get-avatar',\n\t\t\t\t} );\n\n\t\t\t\tsetWidth( response?.data?.width ? parseInt( response.data.width ) : 0 );\n\t\t\t\tsetHeight( response?.data?.height ? parseInt( response.data.height ) : 0 );\n\t\t\t\tsetFile( response?.data?.url ? response.data.url : '' );\n\t\t\t} catch ( error ) {\n\t\t\t\tsetNotice( {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\tmessage: error.message,\n\t\t\t\t} );\n\t\t\t}\n\t\t\tsetSkeleton( false );\n\t\t}\n\n\t\tgetAvatar();\n\t}, [] );\n\n\tfunction readFile( file ) {\n\t\treturn new Promise( ( resolve ) => {\n\t\t\tconst reader = new FileReader();\n\t\t\treader.addEventListener( 'load', () => resolve( reader.result ), false );\n\t\t\treader.readAsDataURL( file );\n\t\t} );\n\t}\n\n\tconst onCropComplete = useCallback( ( croppedArea, croppedAreaPixels ) => {\n\t\tsetCroppedAreaPixels( croppedAreaPixels );\n\t}, [] );\n\n\tconst base64Resize = ( base64, width, height ) => {\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tconst canvas = document.createElement( 'canvas' );\n\t\t\tconst img = document.createElement( 'img' );\n\t\t\timg.src = base64;\n\t\t\timg.setAttribute( 'crossOrigin', 'anonymous' );\n\t\t\timg.onload = () => {\n\t\t\t\tif ( img.naturalWidth > width || img.naturalHeight > height ) {\n\t\t\t\t\tcanvas.width = width;\n\t\t\t\t\tcanvas.height = height;\n\t\t\t\t\tconst ctx = canvas.getContext( '2d' );\n\t\t\t\t\tctx.drawImage( img, 0, 0, width, height );\n\t\t\t\t\tresolve( canvas.toDataURL( 'image/jpeg' ) );\n\t\t\t\t}\n\n\t\t\t\tresolve( base64 );\n\t\t\t};\n\t\t\timg.onerror = ( err ) => reject( err );\n\t\t} );\n\t};\n\n\tconst updateAvatar = useCallback( async () => {\n\t\tsetLoading( { save: true } );\n\n\t\ttry {\n\t\t\tconst croppedImage = await getCroppedImg(\n\t\t\t\tfile,\n\t\t\t\tcroppedAreaPixels,\n\t\t\t\trotation,\n\t\t\t);\n\n\t\t\tconst imageResize = await base64Resize( croppedImage, width, height );\n\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: 'lp/v1/profile/upload-avatar',\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdata: { file: imageResize || '' },\n\t\t\t} );\n\n\t\t\tconst { data, status, message } = await response;\n\n\t\t\tif ( status === 'success' ) {\n\t\t\t\twindow.location.reload();\n\t\t\t}\n\n\t\t\tsetNotice( {\n\t\t\t\ttype: status,\n\t\t\t\tmessage,\n\t\t\t} );\n\t\t} catch ( e ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: e.message || '',\n\t\t\t} );\n\t\t}\n\n\t\tsetLoading( { save: false } );\n\t}, [ croppedAreaPixels, rotation ] );\n\n\tconst setFileInput = async ( fileUpload ) => {\n\t\tconst file = await readFile( fileUpload );\n\n\t\tconst img = new Image();\n\t\timg.src = await file;\n\t\timg.onload = await function() {\n\t\t\tsetNaturalWidth( img.naturalWidth );\n\t\t\tsetNaturalHeight( img.naturalHeight );\n\n\t\t\tlet error = '';\n\t\t\tif ( parseInt( fileUpload.size ) > 2097152 ) {\n\t\t\t\terror = __( 'The file size is too large. You need to upload a file < 2MB.', 'learnpress' );\n\t\t\t} else if ( img.naturalWidth < width || img.naturalHeight < height ) {\n\t\t\t\terror = sprintf( __( 'The image size must be greater than or equal to %1$sx%2$spx', 'learnpress' ), width, height );\n\t\t\t}\n\n\t\t\tif ( error ) {\n\t\t\t\tsetUploadError( error );\n\t\t\t} else {\n\t\t\t\tsetUploadError( '' );\n\t\t\t\tsetFile( file );\n\t\t\t}\n\t\t};\n\t};\n\n\tasync function removeAvatar() {\n\t\tif ( confirm( __( 'Are you sure you want to remove your avatar?', 'learnpress' ) ) ) {\n\t\t\tsetLoading( { remove: true } );\n\t\t\ttry {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tpath: 'lp/v1/profile/remove-avatar',\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t} );\n\n\t\t\t\tconst { data, status, message } = await response;\n\n\t\t\t\tsetNotice( {\n\t\t\t\t\ttype: status,\n\t\t\t\t\tmessage,\n\t\t\t\t} );\n\n\t\t\t\tsetFile( '' );\n\t\t\t} catch ( e ) {\n\t\t\t\tsetNotice( {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\tmessage: e.message || '',\n\t\t\t\t} );\n\t\t\t}\n\t\t\tsetLoading( { remove: false } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className=\"learnpress_avatar\">\n\t\t\t{ ! skeleton ? (\n\t\t\t\t<>\n\t\t\t\t\t{ file && ! uploadError && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ naturalHeight && naturalWidth ? (\n\t\t\t\t\t\t\t\t<div className=\"learnpress_avatar__cropper\">\n\t\t\t\t\t\t\t\t\t<div style={ { position: 'relative', width: naturalWidth, height: naturalHeight, zIndex: 9999, maxWidth: '100%', maxHeight: '800px' } }>\n\t\t\t\t\t\t\t\t\t\t<Cropper\n\t\t\t\t\t\t\t\t\t\t\timage={ file }\n\t\t\t\t\t\t\t\t\t\t\tcrop={ crop }\n\t\t\t\t\t\t\t\t\t\t\tzoom=\"1\"\n\t\t\t\t\t\t\t\t\t\t\tcropSize={ { width, height } }\n\t\t\t\t\t\t\t\t\t\t\tonCropChange={ setCrop }\n\t\t\t\t\t\t\t\t\t\t\tonCropComplete={ onCropComplete }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<button className={ `learnpress_avatar__button learnpress_avatar__button--save ${ loading?.save ? 'learnpress_avatar__button--loading' : '' }` } onClick={ updateAvatar }>{ __( 'Save', 'learnpress' ) }</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"learnpress_avatar__cropper\">\n\t\t\t\t\t\t\t\t\t<img src={ file } alt=\"\" />\n\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<button className={ `learnpress_avatar__button learnpress_avatar__button--replace` } onClick={ () => fileInput.current && fileInput.current.click() }>{ __( 'Replace', 'learnpress' ) }</button>\n\t\t\t\t\t\t\t\t\t\t<button className={ `learnpress_avatar__button learnpress_avatar__button--remove ${ loading?.remove ? 'learnpress_avatar__button--loading' : '' }` } onClick={ removeAvatar }>{ __( 'Remove', 'learnpress' ) }</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<form style={ { display: ! file ? '' : 'none' } }>\n\t\t\t\t\t\t<div className=\"learnpress_avatar__form\">\n\t\t\t\t\t\t\t<div className=\"learnpress_avatar__form-group\">\n\t\t\t\t\t\t\t\t<label htmlFor=\"avatar-file\">\n\t\t\t\t\t\t\t\t\t<div className=\"learnpress_avatar__form__upload\">\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<span><svg viewBox=\"64 64 896 896\" focusable=\"false\" data-icon=\"plus\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><defs><style></style></defs><path d=\"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z\"></path><path d=\"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z\"></path></svg></span>\n\t\t\t\t\t\t\t\t\t\t\t<div>{ __( 'Upload', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<input ref={ fileInput } type=\"file\" id=\"avatar-file\" accept=\"image/*\" onChange={ ( e ) => setFileInput( e.target.files && e.target.files.length > 0 ? e.target.files[ 0 ] : '' ) } />\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t{ uploadError && (\n\t\t\t\t\t\t<div className={ `lp-ajax-message error` } style={ { display: 'block' } }>{ uploadError }</div>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! uploadError && notice && notice.type && notice.message && (\n\t\t\t\t\t\t<div className={ `lp-ajax-message ${ notice.type }` } style={ { display: 'block' } }>{ notice.message }</div>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<ul className=\"lp-skeleton-animation\">\n\t\t\t\t\t<li style={ { width: 200, height: 200 } }></li>\n\t\t\t\t\t<li style={ { width: 200, height: 20 } }></li>\n\t\t\t\t\t<li style={ { width: 200, height: 20 } }></li>\n\t\t\t\t</ul>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\n// Link: https://codesandbox.io/s/q8q1mnr01w\nconst createImage = ( url ) =>\n\tnew Promise( ( resolve, reject ) => {\n\t\tconst image = new Image();\n\t\timage.addEventListener( 'load', () => resolve( image ) );\n\t\timage.addEventListener( 'error', ( error ) => reject( error ) );\n\t\timage.setAttribute( 'crossOrigin', 'anonymous' ); // needed to avoid cross-origin issues on CodeSandbox\n\t\timage.src = url;\n\t} );\n\nfunction getRadianAngle( degreeValue ) {\n\treturn ( degreeValue * Math.PI ) / 180;\n}\n\n/**\n * Returns the new bounding area of a rotated rectangle.\n *\n * @param width\n * @param height\n * @param rotation\n */\nfunction rotateSize( width, height, rotation ) {\n\tconst rotRad = getRadianAngle( rotation );\n\n\treturn {\n\t\twidth:\nMath.abs( Math.cos( rotRad ) * width ) + Math.abs( Math.sin( rotRad ) * height ),\n\t\theight:\nMath.abs( Math.sin( rotRad ) * width ) + Math.abs( Math.cos( rotRad ) * height ),\n\t};\n}\n\n/**\n * This function was adapted from the one in the ReadMe of https://github.com/DominicTobias/react-image-crop\n *\n * @param imageSrc\n * @param pixelCrop\n * @param rotation\n * @param flip\n */\nasync function getCroppedImg(\n\timageSrc,\n\tpixelCrop,\n\trotation = 0,\n\tflip = { horizontal: false, vertical: false }\n) {\n\tconst image = await createImage( imageSrc );\n\tconst canvas = document.createElement( 'canvas' );\n\tconst ctx = canvas.getContext( '2d' );\n\n\tif ( ! ctx ) {\n\t\treturn null;\n\t}\n\n\tconst rotRad = getRadianAngle( rotation );\n\n\t// calculate bounding box of the rotated image\n\tconst { width: bBoxWidth, height: bBoxHeight } = rotateSize(\n\t\timage.width,\n\t\timage.height,\n\t\trotation\n\t);\n\n\t// set canvas size to match the bounding box\n\tcanvas.width = bBoxWidth;\n\tcanvas.height = bBoxHeight;\n\n\t// translate canvas context to a central location to allow rotating and flipping around the center\n\tctx.translate( bBoxWidth / 2, bBoxHeight / 2 );\n\tctx.rotate( rotRad );\n\tctx.scale( flip.horizontal ? -1 : 1, flip.vertical ? -1 : 1 );\n\tctx.translate( -image.width / 2, -image.height / 2 );\n\n\t// draw rotated image\n\tctx.drawImage( image, 0, 0 );\n\n\t// croppedAreaPixels values are bounding box relative\n\t// extract the cropped image using these values\n\tconst data = ctx.getImageData(\n\t\tpixelCrop.x,\n\t\tpixelCrop.y,\n\t\tpixelCrop.width,\n\t\tpixelCrop.height\n\t);\n\n\t// set canvas width to final desired crop size - this will clear existing context\n\tcanvas.width = pixelCrop.width;\n\tcanvas.height = pixelCrop.height;\n\n\t// paste generated rotate image at the top left corner\n\tctx.putImageData( data, 0, 0 );\n\n\t// As Base64 string\n\treturn canvas.toDataURL( 'image/jpeg' );\n}\n","import { addQueryArgs } from '@wordpress/url';\n\n// Rest API load content course enrolled, created - Nhamdv.\nconst courseTab = () => {\n\tconst elements = document.querySelectorAll( '.learn-press-course-tab__filter__content' );\n\n\tconst getResponse = ( ele, dataset, append = false, viewMoreEle = false ) => {\n\t\twp.apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/profile/course-tab', dataset ),\n\t\t\tmethod: 'GET',\n\t\t} ).then( ( response ) => {\n\t\t\tconst skeleton = ele.querySelector( '.lp-skeleton-animation' );\n\t\t\tskeleton && skeleton.remove();\n\n\t\t\tif ( response.status === 'success' && response.data ) {\n\t\t\t\tif ( append ) {\n\t\t\t\t\tele.innerHTML += response.data;\n\t\t\t\t} else {\n\t\t\t\t\tele.innerHTML = response.data;\n\t\t\t\t}\n\t\t\t} else if ( append ) {\n\t\t\t\tele.innerHTML += `<div class=\"lp-ajax-message\" style=\"display:block\">${ response.message && response.message }</div>`;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message\" style=\"display:block\">${ response.message && response.message }</div>`;\n\t\t\t}\n\n\t\t\tif ( viewMoreEle ) {\n\t\t\t\tviewMoreEle.classList.remove( 'loading' );\n\n\t\t\t\tconst paged = viewMoreEle.dataset.paged;\n\t\t\t\tconst numberPage = viewMoreEle.dataset.number;\n\n\t\t\t\tif ( numberPage <= paged ) {\n\t\t\t\t\tviewMoreEle.remove();\n\t\t\t\t}\n\n\t\t\t\tviewMoreEle.dataset.paged = parseInt( paged ) + 1;\n\t\t\t}\n\n\t\t\tviewMore( ele, dataset );\n\t\t} ).catch( ( error ) => {\n\t\t\tif ( append ) {\n\t\t\t\tele.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message && error.message }</div>`;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message && error.message }</div>`;\n\t\t\t}\n\n\t\t\tif ( viewMoreEle ) {\n\t\t\t\tviewMoreEle.classList.remove( 'loading' );\n\n\t\t\t\tconst paged = viewMoreEle.dataset.paged;\n\t\t\t\tconst numberPage = viewMoreEle.dataset.number;\n\n\t\t\t\tif ( numberPage <= paged ) {\n\t\t\t\t\tviewMoreEle.remove();\n\t\t\t\t}\n\n\t\t\t\tviewMoreEle.dataset.paged = parseInt( paged ) + 1;\n\t\t\t}\n\t\t} );\n\t};\n\n\tif ( 'IntersectionObserver' in window ) {\n\t\tconst eleObserver = new IntersectionObserver( ( entries, observer ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tconst ele = entry.target;\n\n\t\t\t\t\tconst params = ele.parentNode.querySelector( '.lp_profile_tab_input_param' );\n\t\t\t\t\tconst data = { ...JSON.parse( params.value ), status: ele.dataset.tab || '' };\n\n\t\t\t\t\tgetResponse( ele, data );\n\n\t\t\t\t\teleObserver.unobserve( ele );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t[ ...elements ].map( ( ele ) => {\n\t\t\tif ( ele.dataset.tab !== 'all' ) {\n\t\t\t\teleObserver.observe( ele );\n\t\t\t} else {\n\t\t\t\tconst params = ele.parentNode.querySelector( '.lp_profile_tab_input_param' );\n\t\t\t\tconst data = { ...JSON.parse( params.value ), status: ele.dataset.tab === 'all' ? '' : ele.dataset.tab || '' };\n\n\t\t\t\tgetResponse( ele, data );\n\t\t\t}\n\t\t} );\n\t}\n\n\tconst changeFilter = () => {\n\t\tconst tabs = document.querySelectorAll( '.learn-press-course-tab-filters' );\n\n\t\ttabs.forEach( ( tab ) => {\n\t\t\tconst filters = tab.querySelectorAll( '.learn-press-filters a' );\n\n\t\t\tfilters.forEach( ( filter ) => {\n\t\t\t\tfilter.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tconst tabName = filter.dataset.tab;\n\n\t\t\t\t\t[ ...filters ].map( ( ele ) => {\n\t\t\t\t\t\tele.classList.remove( 'active' );\n\t\t\t\t\t} );\n\n\t\t\t\t\tfilter.classList.add( 'active' );\n\n\t\t\t\t\t[ ...tab.querySelectorAll( '.learn-press-course-tab__filter__content' ) ].map( ( ele ) => {\n\t\t\t\t\t\tele.style.display = 'none';\n\n\t\t\t\t\t\tif ( ele.dataset.tab === tabName ) {\n\t\t\t\t\t\t\tele.style.display = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\t};\n\n\tchangeFilter();\n\n\tconst changeTab = () => {\n\t\tconst tabUls = document.querySelectorAll( '.learn-press-profile-course__tab__inner' );\n\n\t\ttabUls.forEach( ( tabUl ) => {\n\t\t\tconst tabs = tabUl.querySelectorAll( 'li> a' );\n\n\t\t\ttabs.forEach( ( tab ) => {\n\t\t\t\ttab.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tconst tabName = tab.dataset.tab;\n\n\t\t\t\t\t[ ...tabs ].map( ( ele ) => {\n\t\t\t\t\t\tele.classList.remove( 'active' );\n\t\t\t\t\t} );\n\n\t\t\t\t\ttab.classList.add( 'active' );\n\n\t\t\t\t\t[ ...document.querySelectorAll( '.learn-press-course-tab-filters' ) ].map( ( ele ) => {\n\t\t\t\t\t\tele.style.display = 'none';\n\n\t\t\t\t\t\tif ( ele.dataset.tab === tabName ) {\n\t\t\t\t\t\t\tele.style.display = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\t};\n\tchangeTab();\n\n\tconst viewMore = ( ele, dataset ) => {\n\t\tconst viewMoreEle = ele.querySelector( 'button[data-paged]' );\n\n\t\tif ( viewMoreEle ) {\n\t\t\tviewMoreEle.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst paged = viewMoreEle && viewMoreEle.dataset.paged;\n\n\t\t\t\tviewMoreEle.classList.add( 'loading' );\n\n\t\t\t\tconst element = dataset.layout === 'list' ? '.lp_profile_course_progress' : '.learn-press-courses';\n\n\t\t\t\tgetResponse( ele.querySelector( element ), { ...dataset, ...{ paged } }, true, viewMoreEle );\n\t\t\t} );\n\t\t}\n\t};\n};\nexport default courseTab;\n","const $ = window.jQuery;\n\nexport default function recoverOrder() {\n\t\tconst wrap = $( '.order-recover' ),\n\t\tbuttonRecoverOrder = wrap.find( '.button-recover-order' );\n\n\t\tconst ajaxRecover = () => {\n\t\t\twrap.find( '.learn-press-message' ).remove();\n\n\t\t\t$( '.profile-recover-order' ).find( '.learn-press-message' ).remove();\n\n\t\t\t$.post( {\n\t\t\t\turl: '',\n\t\t\t\tdata: wrap.serializeJSON(),\n\t\t\t\tbeforeSend() {\n\t\t\t\t\tbuttonRecoverOrder.addClass( 'loading' ).attr( 'disabled', 'disabled' );\n\t\t\t\t},\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\n\t\t\t\t\tif ( response.message ) {\n\t\t\t\t\t\tconst $msg = $( '<div class=\"learn-press-message icon\"><i class=\"fa\"></i> ' + response.message + '</div>' );\n\n\t\t\t\t\t\tif ( response.result == 'error' ) {\n\t\t\t\t\t\t\t$msg.addClass( 'error' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twrap.before( $msg );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( response.redirect ) {\n\t\t\t\t\t\twindow.location.href = response.redirect;\n\t\t\t\t\t}\n\n\t\t\t\t\tbuttonRecoverOrder.removeClass( 'loading' ).removeAttr( 'disabled', '' );\n\t\t\t\t},\n\t\t\t\terror() {\n\t\t\t\t\tbuttonRecoverOrder.removeClass( 'loading' ).removeAttr( 'disabled', '' );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tbuttonRecoverOrder.on( 'click', ajaxRecover );\n};\n\n","import { addQueryArgs } from '@wordpress/url';\n\n// Rest API load content course progress - Nhamdv.\nconst courseStatistics = () => {\n\tconst elements = document.querySelector( '.learn-press-profile-course__statistic' );\n\n\tif ( ! elements ) {\n\t\treturn;\n\t}\n\n\tconst getResponse = ( ele, dataset ) => {\n\t\twp.apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/profile/statistic', dataset ),\n\t\t\tmethod: 'GET',\n\t\t} ).then( ( response ) => {\n\t\t\tif ( response.status === 'success' && response.data ) {\n\t\t\t\tele.innerHTML = response.data;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message error\" style=\"display:block\">${ response.message && response.message }</div>`;\n\t\t\t}\n\t\t} ).catch( ( err ) => {\n\t\t\tconsole.log( err );\n\t\t\t//ele.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ err.message && err.message }</div>`;\n\t\t} );\n\t};\n\n\tconst elArgStatistic = document.querySelector( '[name=\"args_query_user_courses_statistic\"]' );\n\tif ( ! elArgStatistic ) {\n\t\treturn;\n\t}\n\n\tconst data = JSON.parse( elArgStatistic.value );\n\n\tgetResponse( elements, data );\n};\nexport default courseStatistics;\n","module.exports = require('./src/normalizeWheel.js');\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\n'use strict';\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n","/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on javascript@lists.facebook.com before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent = /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(uas);\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!(/Win64/.exec(uas));\n\n if (agent) {\n _ie = agent[1] ? parseFloat(agent[1]) : (\n agent[5] ? parseFloat(agent[5]) : NaN);\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function() {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function() {\n return _populate() || (_ie_real_version > _ie);\n },\n\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function() {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function() {\n return _populate() || _firefox;\n },\n\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function() {\n return _populate() || _opera;\n },\n\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function() {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function() {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome : function() {\n return _populate() || _chrome;\n },\n\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function() {\n return _populate() || _windows;\n },\n\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function() {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function() {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function() {\n return _populate() || _iphone;\n },\n\n mobile: function() {\n return _populate() || (_iphone || _ipad || _android || _mobile);\n },\n\n nativeApp: function() {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function() {\n return _populate() || _android;\n },\n\n ipad: function() {\n return _populate() || _ipad;\n }\n};\n\nmodule.exports = UserAgent_DEPRECATED;\n","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM ||\n capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\n'use strict';\n\nvar UserAgent_DEPRECATED = require('./UserAgent_DEPRECATED');\n\nvar isEventSupported = require('./isEventSupported');\n\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) { sY = event.detail; }\n if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }\n if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }\n if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }\n\n // side scrolling on FF with DOMMouseScroll\n if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) { pY = event.deltaY; }\n if ('deltaX' in event) { pX = event.deltaX; }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }\n if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }\n\n return { spinX : sX,\n spinY : sY,\n pixelX : pX,\n pixelY : pY };\n}\n\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function() /*string*/ {\n return (UserAgent_DEPRECATED.firefox())\n ? 'DOMMouseScroll'\n : (isEventSupported('wheel'))\n ? 'wheel'\n : 'mousewheel';\n};\n\nmodule.exports = normalizeWheel;\n","import { __assign, __extends } from 'tslib';\nimport React from 'react';\nimport normalizeWheel from 'normalize-wheel';\n\n/**\r\n * Compute the dimension of the crop area based on media size,\r\n * aspect ratio and optionally rotation\r\n */\n\nfunction getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n var _a = rotateSize(mediaWidth, mediaHeight, rotation),\n width = _a.width,\n height = _a.height;\n\n var fittingWidth = Math.min(width, containerWidth);\n var fittingHeight = Math.min(height, containerHeight);\n\n if (fittingWidth > fittingHeight * aspect) {\n return {\n width: fittingHeight * aspect,\n height: fittingHeight\n };\n }\n\n return {\n width: fittingWidth,\n height: fittingWidth / aspect\n };\n}\n/**\r\n * Compute media zoom.\r\n * We fit the media into the container with \"max-width: 100%; max-height: 100%;\"\r\n */\n\nfunction getMediaZoom(mediaSize) {\n // Take the axis with more pixels to improve accuracy\n return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight;\n}\n/**\r\n * Ensure a new media position stays in the crop area.\r\n */\n\nfunction restrictPosition(position, mediaSize, cropSize, zoom, rotation) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n var _a = rotateSize(mediaSize.width, mediaSize.height, rotation),\n width = _a.width,\n height = _a.height;\n\n return {\n x: restrictPositionCoord(position.x, width, cropSize.width, zoom),\n y: restrictPositionCoord(position.y, height, cropSize.height, zoom)\n };\n}\n\nfunction restrictPositionCoord(position, mediaSize, cropSize, zoom) {\n var maxPosition = mediaSize * zoom / 2 - cropSize / 2;\n return clamp(position, -maxPosition, maxPosition);\n}\n\nfunction getDistanceBetweenPoints(pointA, pointB) {\n return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));\n}\nfunction getRotationBetweenPoints(pointA, pointB) {\n return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;\n}\n/**\r\n * Compute the output cropped area of the media in percentages and pixels.\r\n * x/y are the top-left coordinates on the src media\r\n */\n\nfunction computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n if (restrictPosition === void 0) {\n restrictPosition = true;\n } // if the media is rotated by the user, we cannot limit the position anymore\n // as it might need to be negative.\n\n\n var limitAreaFn = restrictPosition ? limitArea : noOp;\n var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);\n var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); // calculate the crop area in percentages\n // in the rotated space\n\n var croppedAreaPercentages = {\n x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100),\n y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100),\n width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom),\n height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom)\n }; // we compute the pixels size naively\n\n var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100));\n var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100));\n var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)\n // if the media is wider than high, when zoom is 0, the crop height will be equals to image height\n // thus we want to compute the width from the height and aspect for accuracy.\n // Otherwise, we compute the height from width and aspect.\n\n var sizePixels = isImgWiderThanHigh ? {\n width: Math.round(heightInPixels * aspect),\n height: heightInPixels\n } : {\n width: widthInPixels,\n height: Math.round(widthInPixels / aspect)\n };\n\n var croppedAreaPixels = __assign(__assign({}, sizePixels), {\n x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)),\n y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100))\n });\n\n return {\n croppedAreaPercentages: croppedAreaPercentages,\n croppedAreaPixels: croppedAreaPixels\n };\n}\n/**\r\n * Ensure the returned value is between 0 and max\r\n */\n\nfunction limitArea(max, value) {\n return Math.min(max, Math.max(0, value));\n}\n\nfunction noOp(_max, value) {\n return value;\n}\n/**\r\n * Compute crop and zoom from the croppedAreaPercentages.\r\n */\n\n\nfunction getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) {\n var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); // This is the inverse process of computeCroppedArea\n\n var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom);\n var crop = {\n x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),\n y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100)\n };\n return {\n crop: crop,\n zoom: zoom\n };\n}\n/**\r\n * Compute zoom from the croppedAreaPixels\r\n */\n\nfunction getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {\n var mediaZoom = getMediaZoom(mediaSize);\n return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom);\n}\n/**\r\n * Compute crop and zoom from the croppedAreaPixels\r\n */\n\n\nfunction getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);\n var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom);\n var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width;\n var crop = {\n x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,\n y: ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom\n };\n return {\n crop: crop,\n zoom: zoom\n };\n}\n/**\r\n * Return the point that is the center of point a and b\r\n */\n\nfunction getCenter(a, b) {\n return {\n x: (b.x + a.x) / 2,\n y: (b.y + a.y) / 2\n };\n}\nfunction getRadianAngle(degreeValue) {\n return degreeValue * Math.PI / 180;\n}\n/**\r\n * Returns the new bounding area of a rotated rectangle.\r\n */\n\nfunction rotateSize(width, height, rotation) {\n var rotRad = getRadianAngle(rotation);\n return {\n width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),\n height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)\n };\n}\n/**\r\n * Clamp value between min and max\r\n */\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\n/**\r\n * Combine multiple class names into a single string.\r\n */\n\nfunction classNames() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return args.filter(function (value) {\n if (typeof value === 'string' && value.length > 0) {\n return true;\n }\n\n return false;\n }).join(' ').trim();\n}\n\nvar css_248z = \".reactEasyCrop_Container {\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n overflow: hidden;\\n user-select: none;\\n touch-action: none;\\n cursor: move;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.reactEasyCrop_Image,\\n.reactEasyCrop_Video {\\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\\n}\\n\\n.reactEasyCrop_Contain {\\n max-width: 100%;\\n max-height: 100%;\\n margin: auto;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n}\\n.reactEasyCrop_Cover_Horizontal {\\n width: 100%;\\n height: auto;\\n}\\n.reactEasyCrop_Cover_Vertical {\\n width: auto;\\n height: 100%;\\n}\\n\\n.reactEasyCrop_CropArea {\\n position: absolute;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, -50%);\\n border: 1px solid rgba(255, 255, 255, 0.5);\\n box-sizing: border-box;\\n box-shadow: 0 0 0 9999em;\\n color: rgba(0, 0, 0, 0.5);\\n overflow: hidden;\\n}\\n\\n.reactEasyCrop_CropAreaRound {\\n border-radius: 50%;\\n}\\n\\n.reactEasyCrop_CropAreaGrid::before {\\n content: ' ';\\n box-sizing: border-box;\\n position: absolute;\\n border: 1px solid rgba(255, 255, 255, 0.5);\\n top: 0;\\n bottom: 0;\\n left: 33.33%;\\n right: 33.33%;\\n border-top: 0;\\n border-bottom: 0;\\n}\\n\\n.reactEasyCrop_CropAreaGrid::after {\\n content: ' ';\\n box-sizing: border-box;\\n position: absolute;\\n border: 1px solid rgba(255, 255, 255, 0.5);\\n top: 33.33%;\\n bottom: 33.33%;\\n left: 0;\\n right: 0;\\n border-left: 0;\\n border-right: 0;\\n}\\n\";\n\nvar MIN_ZOOM = 1;\nvar MAX_ZOOM = 3;\n\nvar Cropper =\n/** @class */\nfunction (_super) {\n __extends(Cropper, _super);\n\n function Cropper() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.imageRef = null;\n _this.videoRef = null;\n _this.containerRef = null;\n _this.styleRef = null;\n _this.containerRect = null;\n _this.mediaSize = {\n width: 0,\n height: 0,\n naturalWidth: 0,\n naturalHeight: 0\n };\n _this.dragStartPosition = {\n x: 0,\n y: 0\n };\n _this.dragStartCrop = {\n x: 0,\n y: 0\n };\n _this.lastPinchDistance = 0;\n _this.lastPinchRotation = 0;\n _this.rafDragTimeout = null;\n _this.rafPinchTimeout = null;\n _this.wheelTimer = null;\n _this.state = {\n cropSize: null,\n hasWheelJustStarted: false\n }; // this is to prevent Safari on iOS >= 10 to zoom the page\n\n _this.preventZoomSafari = function (e) {\n return e.preventDefault();\n };\n\n _this.cleanEvents = function () {\n document.removeEventListener('mousemove', _this.onMouseMove);\n document.removeEventListener('mouseup', _this.onDragStopped);\n document.removeEventListener('touchmove', _this.onTouchMove);\n document.removeEventListener('touchend', _this.onDragStopped);\n };\n\n _this.clearScrollEvent = function () {\n if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel);\n\n if (_this.wheelTimer) {\n clearTimeout(_this.wheelTimer);\n }\n };\n\n _this.onMediaLoad = function () {\n var cropSize = _this.computeSizes();\n\n if (cropSize) {\n _this.emitCropData();\n\n _this.setInitialCrop(cropSize);\n }\n\n if (_this.props.onMediaLoaded) {\n _this.props.onMediaLoaded(_this.mediaSize);\n }\n };\n\n _this.setInitialCrop = function (cropSize) {\n if (_this.props.initialCroppedAreaPercentages) {\n var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),\n crop = _a.crop,\n zoom = _a.zoom;\n\n _this.props.onCropChange(crop);\n\n _this.props.onZoomChange && _this.props.onZoomChange(zoom);\n } else if (_this.props.initialCroppedAreaPixels) {\n var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),\n crop = _b.crop,\n zoom = _b.zoom;\n\n _this.props.onCropChange(crop);\n\n _this.props.onZoomChange && _this.props.onZoomChange(zoom);\n }\n };\n\n _this.computeSizes = function () {\n var _a, _b, _c, _d, _e, _f;\n\n var mediaRef = _this.imageRef || _this.videoRef;\n\n if (mediaRef && _this.containerRef) {\n _this.containerRect = _this.containerRef.getBoundingClientRect();\n var containerAspect = _this.containerRect.width / _this.containerRect.height;\n var naturalWidth = ((_a = _this.imageRef) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;\n var naturalHeight = ((_c = _this.imageRef) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;\n var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight;\n var mediaAspect = naturalWidth / naturalHeight; // We do not rely on the offsetWidth/offsetHeight if the media is scaled down\n // as the values they report are rounded. That will result in precision losses\n // when calculating zoom. We use the fact that the media is positionned relative\n // to the container. That allows us to use the container's dimensions\n // and natural aspect ratio of the media to calculate accurate media size.\n // However, for this to work, the container should not be rotated\n\n var renderedMediaSize = void 0;\n\n if (isMediaScaledDown) {\n switch (_this.props.objectFit) {\n default:\n case 'contain':\n renderedMediaSize = containerAspect > mediaAspect ? {\n width: _this.containerRect.height * mediaAspect,\n height: _this.containerRect.height\n } : {\n width: _this.containerRect.width,\n height: _this.containerRect.width / mediaAspect\n };\n break;\n\n case 'horizontal-cover':\n renderedMediaSize = {\n width: _this.containerRect.width,\n height: _this.containerRect.width / mediaAspect\n };\n break;\n\n case 'vertical-cover':\n renderedMediaSize = {\n width: _this.containerRect.height * mediaAspect,\n height: _this.containerRect.height\n };\n break;\n }\n } else {\n renderedMediaSize = {\n width: mediaRef.offsetWidth,\n height: mediaRef.offsetHeight\n };\n }\n\n _this.mediaSize = __assign(__assign({}, renderedMediaSize), {\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight\n });\n var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);\n\n if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {\n _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);\n }\n\n _this.setState({\n cropSize: cropSize\n }, _this.recomputeCropPosition);\n\n return cropSize;\n }\n };\n\n _this.onMouseDown = function (e) {\n e.preventDefault();\n document.addEventListener('mousemove', _this.onMouseMove);\n document.addEventListener('mouseup', _this.onDragStopped);\n\n _this.onDragStart(Cropper.getMousePoint(e));\n };\n\n _this.onMouseMove = function (e) {\n return _this.onDrag(Cropper.getMousePoint(e));\n };\n\n _this.onTouchStart = function (e) {\n if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {\n return;\n }\n\n document.addEventListener('touchmove', _this.onTouchMove, {\n passive: false\n }); // iOS 11 now defaults to passive: true\n\n document.addEventListener('touchend', _this.onDragStopped);\n\n if (e.touches.length === 2) {\n _this.onPinchStart(e);\n } else if (e.touches.length === 1) {\n _this.onDragStart(Cropper.getTouchPoint(e.touches[0]));\n }\n };\n\n _this.onTouchMove = function (e) {\n // Prevent whole page from scrolling on iOS.\n e.preventDefault();\n\n if (e.touches.length === 2) {\n _this.onPinchMove(e);\n } else if (e.touches.length === 1) {\n _this.onDrag(Cropper.getTouchPoint(e.touches[0]));\n }\n };\n\n _this.onDragStart = function (_a) {\n var _b, _c;\n\n var x = _a.x,\n y = _a.y;\n _this.dragStartPosition = {\n x: x,\n y: y\n };\n _this.dragStartCrop = __assign({}, _this.props.crop);\n (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);\n };\n\n _this.onDrag = function (_a) {\n var x = _a.x,\n y = _a.y;\n if (_this.rafDragTimeout) window.cancelAnimationFrame(_this.rafDragTimeout);\n _this.rafDragTimeout = window.requestAnimationFrame(function () {\n if (!_this.state.cropSize) return;\n if (x === undefined || y === undefined) return;\n var offsetX = x - _this.dragStartPosition.x;\n var offsetY = y - _this.dragStartPosition.y;\n var requestedPosition = {\n x: _this.dragStartCrop.x + offsetX,\n y: _this.dragStartCrop.y + offsetY\n };\n var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;\n\n _this.props.onCropChange(newPosition);\n });\n };\n\n _this.onDragStopped = function () {\n var _a, _b;\n\n _this.cleanEvents();\n\n _this.emitCropData();\n\n (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n\n _this.onWheel = function (e) {\n if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) {\n return;\n }\n\n e.preventDefault();\n var point = Cropper.getMousePoint(e);\n var pixelY = normalizeWheel(e).pixelY;\n var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;\n\n _this.setNewZoom(newZoom, point);\n\n if (!_this.state.hasWheelJustStarted) {\n _this.setState({\n hasWheelJustStarted: true\n }, function () {\n var _a, _b;\n\n return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);\n });\n }\n\n if (_this.wheelTimer) {\n clearTimeout(_this.wheelTimer);\n }\n\n _this.wheelTimer = window.setTimeout(function () {\n return _this.setState({\n hasWheelJustStarted: false\n }, function () {\n var _a, _b;\n\n return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);\n });\n }, 250);\n };\n\n _this.getPointOnContainer = function (_a) {\n var x = _a.x,\n y = _a.y;\n\n if (!_this.containerRect) {\n throw new Error('The Cropper is not mounted');\n }\n\n return {\n x: _this.containerRect.width / 2 - (x - _this.containerRect.left),\n y: _this.containerRect.height / 2 - (y - _this.containerRect.top)\n };\n };\n\n _this.getPointOnMedia = function (_a) {\n var x = _a.x,\n y = _a.y;\n var _b = _this.props,\n crop = _b.crop,\n zoom = _b.zoom;\n return {\n x: (x + crop.x) / zoom,\n y: (y + crop.y) / zoom\n };\n };\n\n _this.setNewZoom = function (zoom, point) {\n if (!_this.state.cropSize || !_this.props.onZoomChange) return;\n\n var zoomPoint = _this.getPointOnContainer(point);\n\n var zoomTarget = _this.getPointOnMedia(zoomPoint);\n\n var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);\n var requestedPosition = {\n x: zoomTarget.x * newZoom - zoomPoint.x,\n y: zoomTarget.y * newZoom - zoomPoint.y\n };\n var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;\n\n _this.props.onCropChange(newPosition);\n\n _this.props.onZoomChange(newZoom);\n };\n\n _this.getCropData = function () {\n if (!_this.state.cropSize) {\n return null;\n } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ValentinH/react-easy-crop/issues/6)\n\n\n var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;\n return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);\n };\n\n _this.emitCropData = function () {\n var cropData = _this.getCropData();\n\n if (!cropData) return;\n var croppedAreaPercentages = cropData.croppedAreaPercentages,\n croppedAreaPixels = cropData.croppedAreaPixels;\n\n if (_this.props.onCropComplete) {\n _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);\n }\n\n if (_this.props.onCropAreaChange) {\n _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);\n }\n };\n\n _this.emitCropAreaChange = function () {\n var cropData = _this.getCropData();\n\n if (!cropData) return;\n var croppedAreaPercentages = cropData.croppedAreaPercentages,\n croppedAreaPixels = cropData.croppedAreaPixels;\n\n if (_this.props.onCropAreaChange) {\n _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);\n }\n };\n\n _this.recomputeCropPosition = function () {\n if (!_this.state.cropSize) return;\n var newPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;\n\n _this.props.onCropChange(newPosition);\n\n _this.emitCropData();\n };\n\n return _this;\n }\n\n Cropper.prototype.componentDidMount = function () {\n window.addEventListener('resize', this.computeSizes);\n\n if (this.containerRef) {\n this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {\n passive: false\n });\n this.containerRef.addEventListener('gesturestart', this.preventZoomSafari);\n this.containerRef.addEventListener('gesturechange', this.preventZoomSafari);\n }\n\n if (!this.props.disableAutomaticStylesInjection) {\n this.styleRef = document.createElement('style');\n this.styleRef.setAttribute('type', 'text/css');\n this.styleRef.innerHTML = css_248z;\n document.head.appendChild(this.styleRef);\n } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called\n\n\n if (this.imageRef && this.imageRef.complete) {\n this.onMediaLoad();\n }\n };\n\n Cropper.prototype.componentWillUnmount = function () {\n var _a;\n\n window.removeEventListener('resize', this.computeSizes);\n\n if (this.containerRef) {\n this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);\n this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari);\n }\n\n if (this.styleRef) {\n (_a = this.styleRef.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.styleRef);\n }\n\n this.cleanEvents();\n this.props.zoomWithScroll && this.clearScrollEvent();\n };\n\n Cropper.prototype.componentDidUpdate = function (prevProps) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n\n if (prevProps.rotation !== this.props.rotation) {\n this.computeSizes();\n this.recomputeCropPosition();\n } else if (prevProps.aspect !== this.props.aspect) {\n this.computeSizes();\n } else if (prevProps.zoom !== this.props.zoom) {\n this.recomputeCropPosition();\n } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {\n this.computeSizes();\n } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {\n this.emitCropAreaChange();\n }\n\n if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {\n this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, {\n passive: false\n }) : this.clearScrollEvent();\n }\n\n if (prevProps.video !== this.props.video) {\n (_j = this.videoRef) === null || _j === void 0 ? void 0 : _j.load();\n }\n };\n\n Cropper.prototype.getAspect = function () {\n var _a = this.props,\n cropSize = _a.cropSize,\n aspect = _a.aspect;\n\n if (cropSize) {\n return cropSize.width / cropSize.height;\n }\n\n return aspect;\n };\n\n Cropper.prototype.onPinchStart = function (e) {\n var pointA = Cropper.getTouchPoint(e.touches[0]);\n var pointB = Cropper.getTouchPoint(e.touches[1]);\n this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);\n this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);\n this.onDragStart(getCenter(pointA, pointB));\n };\n\n Cropper.prototype.onPinchMove = function (e) {\n var _this = this;\n\n var pointA = Cropper.getTouchPoint(e.touches[0]);\n var pointB = Cropper.getTouchPoint(e.touches[1]);\n var center = getCenter(pointA, pointB);\n this.onDrag(center);\n if (this.rafPinchTimeout) window.cancelAnimationFrame(this.rafPinchTimeout);\n this.rafPinchTimeout = window.requestAnimationFrame(function () {\n var distance = getDistanceBetweenPoints(pointA, pointB);\n var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);\n\n _this.setNewZoom(newZoom, center);\n\n _this.lastPinchDistance = distance;\n var rotation = getRotationBetweenPoints(pointA, pointB);\n var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);\n _this.props.onRotationChange && _this.props.onRotationChange(newRotation);\n _this.lastPinchRotation = rotation;\n });\n };\n\n Cropper.prototype.render = function () {\n var _this = this;\n\n var _a = this.props,\n image = _a.image,\n video = _a.video,\n mediaProps = _a.mediaProps,\n transform = _a.transform,\n _b = _a.crop,\n x = _b.x,\n y = _b.y,\n rotation = _a.rotation,\n zoom = _a.zoom,\n cropShape = _a.cropShape,\n showGrid = _a.showGrid,\n _c = _a.style,\n containerStyle = _c.containerStyle,\n cropAreaStyle = _c.cropAreaStyle,\n mediaStyle = _c.mediaStyle,\n _d = _a.classes,\n containerClassName = _d.containerClassName,\n cropAreaClassName = _d.cropAreaClassName,\n mediaClassName = _d.mediaClassName,\n objectFit = _a.objectFit;\n return /*#__PURE__*/React.createElement(\"div\", {\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n ref: function ref(el) {\n return _this.containerRef = el;\n },\n \"data-testid\": \"container\",\n style: containerStyle,\n className: classNames('reactEasyCrop_Container', containerClassName)\n }, image ? /*#__PURE__*/React.createElement(\"img\", __assign({\n alt: \"\",\n className: classNames('reactEasyCrop_Image', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)\n }, mediaProps, {\n src: image,\n ref: function ref(el) {\n return _this.imageRef = el;\n },\n style: __assign(__assign({}, mediaStyle), {\n transform: transform || \"translate(\" + x + \"px, \" + y + \"px) rotate(\" + rotation + \"deg) scale(\" + zoom + \")\"\n }),\n onLoad: this.onMediaLoad\n })) : video && /*#__PURE__*/React.createElement(\"video\", __assign({\n autoPlay: true,\n loop: true,\n muted: true,\n className: classNames('reactEasyCrop_Video', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)\n }, mediaProps, {\n ref: function ref(el) {\n return _this.videoRef = el;\n },\n onLoadedMetadata: this.onMediaLoad,\n style: __assign(__assign({}, mediaStyle), {\n transform: transform || \"translate(\" + x + \"px, \" + y + \"px) rotate(\" + rotation + \"deg) scale(\" + zoom + \")\"\n }),\n controls: false\n }), (Array.isArray(video) ? video : [{\n src: video\n }]).map(function (item) {\n return /*#__PURE__*/React.createElement(\"source\", __assign({\n key: item.src\n }, item));\n })), this.state.cropSize && /*#__PURE__*/React.createElement(\"div\", {\n style: __assign(__assign({}, cropAreaStyle), {\n width: this.state.cropSize.width,\n height: this.state.cropSize.height\n }),\n \"data-testid\": \"cropper\",\n className: classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName)\n }));\n };\n\n Cropper.defaultProps = {\n zoom: 1,\n rotation: 0,\n aspect: 4 / 3,\n maxZoom: MAX_ZOOM,\n minZoom: MIN_ZOOM,\n cropShape: 'rect',\n objectFit: 'contain',\n showGrid: true,\n style: {},\n classes: {},\n mediaProps: {},\n zoomSpeed: 1,\n restrictPosition: true,\n zoomWithScroll: true\n };\n\n Cropper.getMousePoint = function (e) {\n return {\n x: Number(e.clientX),\n y: Number(e.clientY)\n };\n };\n\n Cropper.getTouchPoint = function (touch) {\n return {\n x: Number(touch.clientX),\n y: Number(touch.clientY)\n };\n };\n\n return Cropper;\n}(React.Component);\n\nexport default Cropper;\n//# sourceMappingURL=index.module.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"url\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import courseTab from './profile/course-tab';\nimport courseStatistics from './profile/statistic';\nimport recoverOrder from './profile/order-recover';\nimport Avatar from './profile/avatar';\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\tcourseTab();\n\tcourseStatistics();\n\trecoverOrder();\n} );\n\nif ( document.getElementById( 'learnpress-avatar-upload' ) ) {\n\twp.element.render( <Avatar />, document.getElementById( 'learnpress-avatar-upload' ) );\n}\n"],"names":["useState","useCallback","useEffect","useRef","apiFetch","__","sprintf","Cropper","Avatar","file","setFile","width","setWidth","height","setHeight","crop","setCrop","x","y","rotation","setRotation","croppedAreaPixels","setCroppedAreaPixels","naturalWidth","setNaturalWidth","naturalHeight","setNaturalHeight","loading","setLoading","skeleton","setSkeleton","uploadError","setUploadError","notice","setNotice","type","message","fileInput","getAvatar","response","method","path","data","parseInt","url","error","readFile","Promise","resolve","reader","FileReader","addEventListener","result","readAsDataURL","onCropComplete","croppedArea","base64Resize","base64","reject","canvas","document","createElement","img","src","setAttribute","onload","ctx","getContext","drawImage","toDataURL","onerror","err","updateAvatar","save","croppedImage","getCroppedImg","imageResize","status","window","location","reload","e","setFileInput","fileUpload","Image","size","removeAvatar","confirm","remove","position","zIndex","maxWidth","maxHeight","current","click","display","target","files","length","createImage","image","getRadianAngle","degreeValue","Math","PI","rotateSize","rotRad","abs","cos","sin","imageSrc","pixelCrop","flip","horizontal","vertical","bBoxWidth","bBoxHeight","translate","rotate","scale","getImageData","putImageData","addQueryArgs","courseTab","elements","querySelectorAll","getResponse","ele","dataset","append","viewMoreEle","wp","then","querySelector","innerHTML","classList","paged","numberPage","number","viewMore","catch","eleObserver","IntersectionObserver","entries","observer","forEach","entry","isIntersecting","params","parentNode","JSON","parse","value","tab","unobserve","map","observe","changeFilter","tabs","filters","filter","preventDefault","tabName","add","style","changeTab","tabUls","tabUl","element","layout","$","jQuery","recoverOrder","wrap","buttonRecoverOrder","find","ajaxRecover","post","serializeJSON","beforeSend","addClass","attr","success","LP","parseJSON","$msg","before","redirect","href","removeClass","removeAttr","on","courseStatistics","console","log","elArgStatistic","event","getElementById","render"],"sourceRoot":""}
assets/js/dist/frontend/profile.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '4373293e1147e2ab2a86');
assets/js/dist/frontend/profile.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["react"]
assets/js/dist/frontend/question-types.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'f471f496128517385a6a');
assets/js/dist/frontend/question-types.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/question-types.js CHANGED
@@ -158,7 +158,7 @@ class QuestionBase extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Compo
158
  });
159
 
160
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getWarningMessage", () => {
161
- return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Render function should be overwritten from base.', 'learnpress'));
162
  });
163
 
164
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getOptionClass", option => {
158
  });
159
 
160
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getWarningMessage", () => {
161
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('The render function should be overwritten from the base.', 'learnpress'));
162
  });
163
 
164
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getOptionClass", option => {
assets/js/dist/frontend/question-types.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"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L7B,GAAP;AAOA,CAbS,CADW,EAerBd,6DAAY,CAAE,MAAM;AACnB,SAAO,EAAP;AACA,CAFW,CAfS,CAAP,CAkBZE,aAlBY,CAAf;;;;;;;;;;AC9CA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;ACAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA;AACA;;;;;;UCbA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNA;AACA;AAEA,+DAAeA,6DAAf,E","sources":["webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/question-base/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/fill-in-blanks/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/multiple-choices/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/single-choice/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/true-or-false/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/index.js","webpack://learnpress/external window [\"wp\",\"compose\"]","webpack://learnpress/external window [\"wp\",\"data\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/question-types.js"],"sourcesContent":["export { default as QuestionBase } from './question-base';\nexport { default as SingleChoice } from './questions/single-choice';\nexport { default as MultipleChoices } from './questions/multiple-choices';\nexport { default as TrueOrFalse } from './questions/true-or-false';\nexport { default as FillInBlanks } from './questions/fill-in-blanks';\n","/* eslint-disable no-mixed-spaces-and-tabs */\nimport { Component } from '@wordpress/element';\nimport { select as wpSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nconst { isArray, get, set } = lodash;\n\nclass QuestionBase extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\tconst { question } = props;\n\n\t\tthis.state = {\n\t\t\toptionClass: [ 'answer-option' ],\n\t\t\tquestionId: 0,\n\t\t\toptions: question ? this.parseOptions( question.options ) : [],\n\t\t\tself: this,\n\t\t};\n\n\t\tif ( props.$wrap ) {\n\t\t\tthis.$wrap = props.$wrap;\n\t\t}\n\t}\n\n\tstatic getDerivedStateFromProps( props, state ) {\n\t\treturn state.self.prepare( props, state );\n\t}\n\n\tcomponentDidMount() {\n\t\tconst newState = this.prepare( this.props, this.state );\n\n\t\tif ( newState ) {\n\t\t\tthis.setState( newState );\n\t\t}\n\t}\n\n\tprepare = ( props, state ) => {\n\t\tconst { question } = props;\n\n\t\tif ( question && question.id !== state.questionId ) {\n\t\t\treturn {\n\t\t\t\toptions: state.self.parseOptions( question.options ),\n\t\t\t};\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tsetInputRef = ( el, k ) => {\n\t\tif ( ! this.inputs ) {\n\t\t\tthis.inputs = {};\n\t\t}\n\n\t\tthis.inputs[ k ] = el;\n\t}\n\n\t/**\n\t * Only show correct answer\n\t * status = completed\n\t * todo: check isset answered but if skip it will not show.\n\t *\n\t * @author Nhamdv\n\t */\n\tmaybeShowCorrectAnswer = () => {\n\t\tconst { status, isCheckedAnswer, showCorrectReview, isReviewing } = this.props;\n\n\t\treturn ( status === 'completed' && showCorrectReview ) || ( isCheckedAnswer && ! isReviewing );\n\t};\n\n\t/**\n\t * Disable answer option in review mode or user has checked the question.\n\t *\n\t * @param option Doc.\n\t */\n\tmaybeDisabledOption = ( option ) => {\n\t\tconst {\n\t\t\tanswered,\n\t\t\tstatus,\n\t\t\tisCheckedAnswer,\n\t\t} = this.props;\n\n\t\treturn isCheckedAnswer || ( status !== 'started' );\n\t};\n\n\t/**\n\t * Event callback for clicking on answer option to\n\t * store answered\n\t */\n\tsetAnswerChecked = () => ( event ) => {\n\t\tconst {\n\t\t\tupdateUserQuestionAnswers,\n\t\t\tquestion,\n\t\t\tstatus,\n\t\t} = this.props;\n\n\t\tif ( status !== 'started' ) {\n\t\t\treturn __( 'LP Error: can not set answers', 'learnpress' );\n\t\t}\n\n\t\tconst $options = this.$wrap.find( '.option-check' );\n\t\tconst answered = [];\n\t\tconst isSingle = question.type !== 'multi_choice';\n\n\t\t$options.each( ( i, option ) => {\n\t\t\tif ( option.checked ) {\n\t\t\t\tanswered.push( option.value );\n\n\t\t\t\tif ( isSingle ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tupdateUserQuestionAnswers( question.id, isSingle ? answered[ 0 ] : answered );\n\t};\n\n\tmaybeCheckedAnswer = ( value ) => {\n\t\tconst { answered } = this.props;\n\n\t\tif ( isArray( answered ) ) {\n\t\t\treturn !! answered.find( ( a ) => {\n\t\t\t\treturn a == value;\n\t\t\t} );\n\t\t}\n\n\t\treturn value == answered;\n\t};\n\n\tgetOptionType = ( questionType, option ) => {\n\t\tlet type = 'radio';\n\n\t\tswitch ( questionType ) {\n\t\tcase 'multi_choice':\n\t\t\ttype = 'checkbox';\n\t\t\tbreak;\n\t\t}\n\n\t\treturn type;\n\t};\n\n\tisDefaultType = () => {\n\t\treturn this.props.supportOptions;\n\t};\n\n\tgetWarningMessage = () => {\n\t\treturn <>{ __( 'The render function should be overwritten from the base.', 'learnpress' ) }</>;\n\t};\n\n\tgetOptionClass = ( option ) => {\n\t\tconst { answered } = this.props;\n\n\t\tconst classes = [ 'answer-option' ];\n\n\t\treturn classes;\n\t};\n\n\tparseOptions = ( options ) => {\n\t\tif ( options ) {\n\t\t\toptions = ! isArray( options ) ? JSON.parse( CryptoJS.AES.decrypt( options.data, options.key, { format: CryptoJSAesJson } ).toString( CryptoJS.enc.Utf8 ) ) : options;\n\t\t\toptions = ! isArray( options ) ? JSON.parse( options ) : options;\n\t\t}\n\n\t\treturn options || [];\n\t};\n\n\tgetOptions = () => {\n\t\treturn this.state.options || [];\n\t};\n\n\tisCorrect = () => {\n\t\tconst { answered } = this.props;\n\n\t\tif ( ! answered ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet i, option, options;\n\n\t\tfor ( i = 0, options = this.getOptions(); i < options.length; i++ ) {\n\t\t\toption = options[ i ];\n\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\tif ( answered == option.value ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tisChecked = () => {\n\t\tconst { question } = this.props;\n\n\t\treturn wpSelect( 'learnpress/quiz' ).isCheckedAnswer( question.id );\n\t};\n\n\tgetCorrectLabel = () => {\n\t\tconst { status, answered, question } = this.props;\n\n\t\tconst checker = LP.config.isQuestionCorrect[ question.type ] || this.isCorrect;\n\t\tconst isCorrect = checker.call( this );\n\n\t\treturn this.maybeShowCorrectAnswer() && (\n\t\t\t<div className={ `question-response` + ( isCorrect ? ' correct' : ' incorrect' ) }>\n\t\t\t\t<span className=\"label\">{ isCorrect ? __( 'Correct', 'learnpress' ) : __( 'Incorrect', 'learnpress' ) }</span>\n\t\t\t\t<span className=\"point\">{ sprintf( __( '%d/%d point', 'learnpress' ), isCorrect ? question.point : 0, question.point ) }</span>\n\t\t\t</div>\n\t\t);\n\t};\n\n\trender() {\n\t\tconst { question, status } = this.props;\n\n\t\treturn (\n\t\t\t<div className=\"question-answers\">\n\n\t\t\t\t{ this.isDefaultType() && (\n\t\t\t\t\t<ul id={ `answer-options-${ question.id }` } className=\"answer-options\">\n\n\t\t\t\t\t\t{ this.getOptions().map( ( option ) => {\n\t\t\t\t\t\t\tconst ID = `learn-press-answer-option-${ option.uid }`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<li className={ this.getOptionClass( option ).join( ' ' ) }\n\t\t\t\t\t\t\t\t\tkey={ `answer-option-${ option.uid }` }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<input type={ this.getOptionType( question.type, option ) }\n\t\t\t\t\t\t\t\t\t\tclassName=\"option-check\"\n\t\t\t\t\t\t\t\t\t\tname={ status === 'started' ? `learn-press-question-${ question.id }` : '' }\n\t\t\t\t\t\t\t\t\t\tid={ ID }\n\t\t\t\t\t\t\t\t\t\tref={ ( el ) => {\n\t\t\t\t\t\t\t\t\t\t\tthis.setInputRef( el, option.value );\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tonChange={ this.setAnswerChecked() }\n\t\t\t\t\t\t\t\t\t\tdisabled={ this.maybeDisabledOption( option ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ this.maybeCheckedAnswer( option.value ) }\n\t\t\t\t\t\t\t\t\t\tvalue={ status === 'started' ? option.value : '' }\n\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t<label htmlFor={ ID }\n\t\t\t\t\t\t\t\t\t\tclassName=\"option-title\"\n\t\t\t\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: option.title || option.value } }>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</ul>\n\t\t\t\t) }\n\n\t\t\t\t{ ! this.isDefaultType() && this.getWarningMessage() }\n\t\t\t\t{ this.getCorrectLabel() }\n\t\t\t</div>\n\t\t);\n\t}\n}\nexport default QuestionBase;\n","import { __ } from '@wordpress/i18n';\nimport QuestionBase from '../../question-base';\n\nclass QuestionFillInBlanks extends QuestionBase {\n\tcomponentDidMount() {\n\t\tconst { answered } = this.props;\n\n\t\tif ( answered ) {\n\t\t\tconst allFIBs = document.querySelectorAll( '.lp-fib-input > input' );\n\n\t\t\t[ ...allFIBs ].map( ( ele ) => {\n\t\t\t\tif ( answered[ ele.dataset.id ] ) {\n\t\t\t\t\tele.value = answered[ ele.dataset.id ];\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis.updateFibAnswer();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( ! prevProps.answered ) {\n\t\t\tthis.updateFibAnswer();\n\t\t}\n\t}\n\n\tupdateFibAnswer = () => {\n\t\tconst allFIBs = document.querySelectorAll( '.lp-fib-input > input' );\n\t\tconst { answered } = this.props;\n\n\t\tconst answereds = answered || {};\n\n\t\t[ ...allFIBs ].map( ( ele ) => {\n\t\t\tif ( answered === undefined ) {\n\t\t\t\tele.value = '';\n\t\t\t}\n\n\t\t\tele.addEventListener( 'input', ( e ) => {\n\t\t\t\tthis.setAnswered( answereds, ele.dataset.id, e.target.value );\n\t\t\t} );\n\n\t\t\tele.addEventListener( 'paste', ( e ) => {\n\t\t\t\tthis.setAnswered( answereds, ele.dataset.id, e.target.value );\n\t\t\t} );\n\t\t} );\n\t};\n\n\tsetAnswered = ( answered, id, value ) => {\n\t\tconst {\n\t\t\tupdateUserQuestionAnswers,\n\t\t\tquestion,\n\t\t\tstatus,\n\t\t} = this.props;\n\n\t\tif ( status !== 'started' ) {\n\t\t\treturn 'LP Error: can not set answers';\n\t\t}\n\n\t\tconst newAnswered = Object.assign( answered, { [ id ]: value } );\n\n\t\tupdateUserQuestionAnswers( question.id, newAnswered );\n\t};\n\n\tgetCorrectLabel = () => {\n\t\tconst { question, mark } = this.props;\n\n\t\tlet getMark = mark || 0;\n\n\t\tif ( mark ) {\n\t\t\tif ( ! Number.isInteger( mark ) ) {\n\t\t\t\tgetMark = mark.toFixed( 2 );\n\t\t\t}\n\t\t}\n\t\treturn this.maybeShowCorrectAnswer() && (\n\t\t\t<div className=\"question-response correct\">\n\t\t\t\t<span className=\"label\">{ __( 'Points', 'learnpress' ) }</span>\n\t\t\t\t<span className=\"point\">{ `${ getMark }/${ question.point } ${ __( 'point', 'learnpress' ) }` }</span>\n\t\t\t\t<span className=\"lp-fib-note\"><span style={ { background: '#00adff' } }></span>{ __( 'Correct', 'learnpress' ) }</span>\n\t\t\t\t<span className=\"lp-fib-note\"><span style={ { background: '#d85554' } }></span>{ __( 'Incorrect', 'learnpress' ) }</span>\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconvertInputField = ( option ) => {\n\t\tconst { answered, isReviewing, showCorrectReview, isCheckedAnswer } = this.props;\n\n\t\tlet title = option.title;\n\n\t\tconst answers = option?.answers;\n\n\t\toption.ids.map( ( id, index ) => {\n\t\t\tconst textReplace = '{{FIB_' + id + '}}';\n\t\t\tlet elContent = '';\n\n\t\t\tconst answerID = answers ? answers?.[ id ] : undefined;\n\n\t\t\tif ( answerID || isReviewing ) {\n\t\t\t\telContent += `<span class=\"lp-fib-answered ${ ( showCorrectReview || isCheckedAnswer ) && answerID?.correct ? ( answerID?.isCorrect ? 'correct' : 'fail' ) : '' }\">`;\n\n\t\t\t\tif ( ! answerID?.isCorrect ) {\n\t\t\t\t\telContent += `<span class=\"lp-fib-answered__answer\">${ answered?.[ id ] ?? '' }</span>`;\n\t\t\t\t}\n\n\t\t\t\tif ( ! answerID?.isCorrect && answerID?.correct ) {\n\t\t\t\t\telContent += ' → ';\n\t\t\t\t}\n\n\t\t\t\telContent += `<span class=\"lp-fib-answered__fill\">${ answerID?.correct ?? '' }</span>`;\n\t\t\t\telContent += '</span>';\n\t\t\t} else {\n\t\t\t\telContent += '<div class=\"lp-fib-input\" style=\"display: inline-block; width: auto;\">';\n\t\t\t\telContent += '<input type=\"text\" data-id=\"' + id + '\" value=\"\" />';\n\t\t\t\telContent += '</div>';\n\t\t\t}\n\n\t\t\ttitle = title.replace( textReplace, elContent );\n\t\t} );\n\n\t\treturn title;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div className=\"lp-fib-content\">\n\t\t\t\t\t{ this.getOptions().map( ( option ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div key={ `blank-${ option.uid }` } dangerouslySetInnerHTML={ { __html: this.convertInputField( option ) || option.value } }></div>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</div>\n\n\t\t\t\t{ ! this.isDefaultType() && this.getWarningMessage() }\n\t\t\t\t{ this.getCorrectLabel() }\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default QuestionFillInBlanks;\n","import { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport QuestionBase from '../../question-base';\n\nconst { isBoolean } = lodash;\n\nclass QuestionMultipleChoices extends QuestionBase {\n\tisCorrect = () => {\n\t\tconst { answered } = this.props;\n\n\t\tif ( isBoolean( answered ) || ! answered ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet i, option, options;\n\n\t\tfor ( i = 0, options = this.getOptions(); i < options.length; i++ ) {\n\t\t\toption = options[ i ];\n\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\tif ( answered.indexOf( option.value ) === -1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if ( answered.indexOf( option.value ) !== -1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t};\n\n\tgetOptionClass = ( option ) => {\n\t\tconst { answered } = this.props;\n\t\tconst optionClass = [ ...this.state.optionClass ];\n\n\t\tif ( this.maybeShowCorrectAnswer() ) {\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\toptionClass.push( 'answer-correct' );\n\t\t\t}\n\n\t\t\tif ( answered ) {\n\t\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\t\tanswered.indexOf( option.value ) !== -1 && optionClass.push( 'answered-correct' );\n\t\t\t\t} else {\n\t\t\t\t\tanswered.indexOf( option.value ) !== -1 && optionClass.push( 'answered-wrong' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn optionClass;\n\t};\n}\n\nexport default QuestionMultipleChoices;\n","/* eslint-disable no-mixed-spaces-and-tabs */\nimport QuestionBase from '../../question-base';\n\nclass QuestionSingleChoice extends QuestionBase {\n getOptionClass = ( option ) => {\n \tconst { answered } = this.props;\n \tconst optionClass = [ ...this.state.optionClass ];\n\n \tif ( this.maybeShowCorrectAnswer() ) {\n \t\tif ( option.isTrue === 'yes' ) {\n \t\t\toptionClass.push( 'answer-correct' );\n \t\t}\n\n \t\tif ( answered ) {\n \t\t\tif ( option.isTrue === 'yes' ) {\n \t\t\t\t( answered === option.value ) && optionClass.push( 'answered-correct' );\n \t\t\t} else {\n \t\t\t\t( answered === option.value ) && optionClass.push( 'answered-wrong' );\n \t\t\t}\n \t\t}\n \t}\n\n \treturn optionClass;\n };\n}\n\nexport default QuestionSingleChoice;\n","import QuestionBase from '../../question-base';\n\nclass QuestionTrueOrFalse extends QuestionBase {\n\tgetOptionClass = ( option ) => {\n\t\tconst { answered } = this.props;\n\t\tconst optionClass = [ ...this.state.optionClass ];\n\n\t\tif ( this.maybeShowCorrectAnswer() ) {\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\toptionClass.push( 'answer-correct' );\n\t\t\t}\n\n\t\t\tif ( answered ) {\n\t\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\t\t( answered === option.value ) && optionClass.push( 'answered-correct' );\n\t\t\t\t} else {\n\t\t\t\t\t( answered === option.value ) && optionClass.push( 'answered-wrong' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn optionClass;\n\t};\n}\n\nexport default QuestionTrueOrFalse;\n","import { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\n\nexport * from './components';\n\nclass QuestionTypes extends Component {\n\tgetQuestion = () => {\n\t\tconst { question } = this.props;\n\n\t\tconst types = LP.Hook.applyFilters( 'question-types', {\n\t\t\tsingle_choice: LP.questionTypes.SingleChoice,\n\t\t\tmulti_choice: LP.questionTypes.MultipleChoices,\n\t\t\ttrue_or_false: LP.questionTypes.TrueOrFalse,\n\t\t\tfill_in_blanks: LP.questionTypes.FillInBlanks,\n\t\t} );\n\n\t\treturn types[ question.type ];\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tquestion,\n\t\t\tsupportOptions,\n\t\t} = this.props;\n\n\t\tconst childProps = { ...this.props };\n\t\tchildProps.supportOptions = supportOptions.indexOf( question.type ) !== -1;\n\n\t\tconst TheQuestion = this.getQuestion() || function() {\n\t\t\treturn (\n\t\t\t\t<div className=\"question-types\"\n\t\t\t\t\tdangerouslySetInnerHTML={ { __html: sprintf( __( 'Question <code>%s</code> invalid!', 'learnpress' ), question.type ) } }>\n\t\t\t\t</div>\n\t\t\t);\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<TheQuestion { ...childProps } />\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, { question: { id } } ) => {\n\t\tconst {\n\t\t\tgetData,\n\t\t\tisCheckedAnswer,\n\t\t} = select( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tsupportOptions: getData( 'supportOptions' ),\n\t\t\tisCheckedAnswer: isCheckedAnswer( id ),\n\t\t\tkeyPressed: getData( 'keyPressed' ),\n\t\t\tshowCorrectReview: getData( 'showCorrectReview' ),\n\t\t\tisReviewing: getData( 'mode' ) === 'reviewing',\n\t\t};\n\t} ),\n\twithDispatch( () => {\n\t\treturn {};\n\t} )\n)( QuestionTypes );\n","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export * from './question-types/index';\nimport QuestionTypes from './question-types/index';\n\nexport default QuestionTypes;\n"],"names":["default","QuestionBase","SingleChoice","MultipleChoices","TrueOrFalse","FillInBlanks","Component","select","wpSelect","__","isArray","get","set","lodash","constructor","props","arguments","state","question","id","questionId","options","self","parseOptions","el","k","inputs","status","isCheckedAnswer","showCorrectReview","isReviewing","option","answered","event","updateUserQuestionAnswers","$options","$wrap","find","isSingle","type","each","i","checked","push","value","a","questionType","supportOptions","classes","JSON","parse","CryptoJS","AES","decrypt","data","key","format","CryptoJSAesJson","toString","enc","Utf8","getOptions","length","isTrue","checker","LP","config","isQuestionCorrect","isCorrect","call","maybeShowCorrectAnswer","sprintf","point","optionClass","getDerivedStateFromProps","prepare","componentDidMount","newState","setState","render","isDefaultType","map","ID","uid","getOptionClass","join","getOptionType","setInputRef","setAnswerChecked","maybeDisabledOption","maybeCheckedAnswer","__html","title","getWarningMessage","getCorrectLabel","QuestionFillInBlanks","allFIBs","document","querySelectorAll","answereds","ele","undefined","addEventListener","e","setAnswered","dataset","target","newAnswered","Object","assign","mark","getMark","Number","isInteger","toFixed","background","answers","ids","index","textReplace","elContent","answerID","correct","replace","updateFibAnswer","componentDidUpdate","prevProps","convertInputField","isBoolean","QuestionMultipleChoices","indexOf","QuestionSingleChoice","QuestionTrueOrFalse","compose","withDispatch","withSelect","QuestionTypes","types","Hook","applyFilters","single_choice","questionTypes","multi_choice","true_or_false","fill_in_blanks","childProps","TheQuestion","getQuestion","getData","keyPressed"],"sourceRoot":""}
assets/js/dist/frontend/question-types.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3cfc6e1d4c1c1fa2326e');
assets/js/dist/frontend/question-types.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/quiz.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '99b6b198172cb31911a3');
assets/js/dist/frontend/quiz.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["LP-data-controls"]
assets/js/dist/frontend/quiz.js CHANGED
@@ -31,7 +31,7 @@ const Attempts = () => {
31
  className: "quiz-attempts"
32
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
33
  className: "attempts-heading"
34
- }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Last Attempted', 'learnpress')), hasAttempts && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("table", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("thead", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("tr", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
35
  className: "quiz-attempts__questions"
36
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Questions', 'learnpress')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
37
  className: "quiz-attempts__spend"
@@ -189,10 +189,10 @@ class ButtonCheck extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Compon
189
  onClick: this.checkAnswer
190
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", {
191
  className: "instant-check__icon"
192
- }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Check answer', 'learnpress'), !answered && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
193
  className: "instant-check__info",
194
  dangerouslySetInnerHTML: {
195
- __html: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('You need to answer the question before check answer.', 'learnpress')
196
  }
197
  })));
198
  }
@@ -341,7 +341,7 @@ class Buttons extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component
341
  isOpen
342
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
343
 
344
- if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure you want to retake quiz?', 'learnpress'), this.startQuiz)) {
345
  !isOpen() && btn && btn.removeAttribute('disabled');
346
  return;
347
  }
@@ -436,7 +436,7 @@ class Buttons extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component
436
  confirm
437
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
438
 
439
- if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure to submit quiz?', 'learnpress'), this.submit)) {
440
  return;
441
  }
442
 
@@ -1810,7 +1810,7 @@ const Status = () => {
1810
  confirm
1811
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('learnpress/modal');
1812
 
1813
- if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Are you sure to submit quiz?', 'learnpress'), submit)) {
1814
  return;
1815
  }
1816
 
@@ -1907,18 +1907,11 @@ const Timer = () => {
1907
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('learnpress/quiz');
1908
  const totalTime = getData('totalTime');
1909
  const durationTime = getData('duration');
1910
- /* const endTime = getData( 'endTime' );
1911
- const d1 = new Date( endTime.replace( /-/g, '/' ) );
1912
- const d2 = new Date();
1913
- const tz = new Date().getTimezoneOffset();
1914
- const t = parseInt( ( d1.getTime() / 1000 ) - ( ( d2.getTime() / 1000 ) + ( tz * 60 ) ) );*/
1915
-
1916
  const [seconds, setSeconds] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(totalTime);
1917
  let [timeSpend, setTimeSpend] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
1918
- const limitTime = totalTime > 0;
1919
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
1920
  const myInterval = setInterval(() => {
1921
- if (limitTime) {
1922
  let remainSeconds = seconds;
1923
  remainSeconds -= 1;
1924
 
@@ -2697,11 +2690,13 @@ const submitQuiz = (state, action) => {
2697
  const newArgs = {};
2698
 
2699
  if (state.reviewQuestions) {
2700
- if (action.results.questions[question.id].explanation) {
 
 
2701
  newArgs.explanation = action.results.questions[question.id].explanation;
2702
  }
2703
 
2704
- if (action.results.questions[question.id].options) {
2705
  newArgs.options = action.results.questions[question.id].options;
2706
  }
2707
  }
31
  className: "quiz-attempts"
32
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
33
  className: "attempts-heading"
34
+ }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Last Attempt', 'learnpress')), hasAttempts && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("table", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("thead", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("tr", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
35
  className: "quiz-attempts__questions"
36
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Questions', 'learnpress')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
37
  className: "quiz-attempts__spend"
189
  onClick: this.checkAnswer
190
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", {
191
  className: "instant-check__icon"
192
+ }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Check answers', 'learnpress'), !answered && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
193
  className: "instant-check__info",
194
  dangerouslySetInnerHTML: {
195
+ __html: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('You need to answer the question before checking the answer key.', 'learnpress')
196
  }
197
  })));
198
  }
341
  isOpen
342
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
343
 
344
+ if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure you want to retake the quiz?', 'learnpress'), this.startQuiz)) {
345
  !isOpen() && btn && btn.removeAttribute('disabled');
346
  return;
347
  }
436
  confirm
437
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
438
 
439
+ if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure to submit the quiz?', 'learnpress'), this.submit)) {
440
  return;
441
  }
442
 
1810
  confirm
1811
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('learnpress/modal');
1812
 
1813
+ if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Are you sure to submit the quiz?', 'learnpress'), submit)) {
1814
  return;
1815
  }
1816
 
1907
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('learnpress/quiz');
1908
  const totalTime = getData('totalTime');
1909
  const durationTime = getData('duration');
 
 
 
 
 
 
1910
  const [seconds, setSeconds] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(totalTime);
1911
  let [timeSpend, setTimeSpend] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
 
1912
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
1913
  const myInterval = setInterval(() => {
1914
+ if (durationTime > 0) {
1915
  let remainSeconds = seconds;
1916
  remainSeconds -= 1;
1917
 
2690
  const newArgs = {};
2691
 
2692
  if (state.reviewQuestions) {
2693
+ var _action$results$quest, _action$results$quest2;
2694
+
2695
+ if ((_action$results$quest = action.results.questions[question.id]) !== null && _action$results$quest !== void 0 && _action$results$quest.explanation) {
2696
  newArgs.explanation = action.results.questions[question.id].explanation;
2697
  }
2698
 
2699
+ if ((_action$results$quest2 = action.results.questions[question.id]) !== null && _action$results$quest2 !== void 0 && _action$results$quest2.options) {
2700
  newArgs.options = action.results.questions[question.id].options;
2701
  }
2702
  }
assets/js/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