/
www
/
wwwroot
/
alo88.autos
/
wp-content
/
plugins
/
internal-links
/
admin
/
js
/
Upload File
HOME
{"version":3,"file":"ilj-keywords-editor.min.js","mappings":"2BAAIA,oBAAsB,CAAC,EAI3BC,QAAO,SAAUC,GAafA,EAAE,mCAAmCC,YAAY,CAC/CC,wBAAyB,GACzBC,MAAO,MACPC,MAAM,EACNC,gBAAiB,CAAC,OAEpB,IAjBkBC,EAAMC,EAClBC,EAgBFC,GAjBcH,EAiBkB,SAAUI,GAC5C,IAAIC,EAAkB,GACtBX,EAAEU,EAAEE,eAAeC,KAAK,mBAAmBC,MAAK,WAC9CH,EAAgBI,KAAKf,EAAEgB,MAAMC,MAC/B,IAMAjB,EAAEU,EAAEE,eAAeM,KAAK,0BAA0BL,KAAK,8BAA8BM,QACrF,IAAIC,EAAUpB,EAAEU,EAAEE,eAAeS,QAAQ,MAAMR,KAAK,YACpDO,EAAQE,SAAS,aACjBtB,EAAEuB,KAAK,CACLC,IAAKxB,EAAEU,EAAEE,eAAea,KAAK,cAC7BC,KAAM,OACND,KAAM,CACJE,SAAUhB,KAEXiB,QAAO,WACRR,EAAQS,YAAY,YACtB,GACF,EAvCwBtB,EAuCrB,IArCM,WACL,IAAIuB,EAAUd,KACVe,EAAOC,UACXC,aAAazB,GACbA,EAAa0B,YAAW,WACtB5B,EAAK6B,MAAML,EAASC,EACtB,GAAGxB,EACL,GA+BFP,EAAE,mCAAmCoC,GAAG,kCAAmC3B,EAC7E","sources":["webpack://wp-internal-linkjuicer/./src/admin/js/ilj-keywords-editor.js"],"sourcesContent":["var __webpack_exports__ = {};\n/*!*********************************************!*\\\n !*** ./src/admin/js/ilj-keywords-editor.js ***!\n \\*********************************************/\njQuery(function ($) {\n // Debounce the events emitted from select2 input, to prevent multiple ajax calls.\n function debounce(func, delay) {\n var timeout_id;\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timeout_id);\n timeout_id = setTimeout(function () {\n func.apply(context, args);\n }, delay);\n };\n }\n $('.ilj-keywords-editor-select-box').ilj_select2({\n minimumResultsForSearch: 10,\n width: '50%',\n tags: true,\n tokenSeparators: [',']\n });\n var handle_option_change = debounce(function (e) {\n var selected_values = [];\n $(e.currentTarget).find('option:selected').each(function () {\n selected_values.push($(this).val());\n });\n /**\n * The current version of select2 loses focus when the option is selected, so we need to\n * set focus on search field again.\n * @see https://github.com/select2/select2/issues/5185\n */\n $(e.currentTarget).next('.ilj-select2-container').find('.ilj-select2-search__field').focus();\n var spinner = $(e.currentTarget).closest('tr').find('.spinner');\n spinner.addClass('is-active');\n $.ajax({\n url: $(e.currentTarget).data('iljSaveUrl'),\n type: 'POST',\n data: {\n keywords: selected_values\n }\n }).always(function () {\n spinner.removeClass('is-active');\n });\n }, 100);\n $('.ilj-keywords-editor-select-box').on('select2:select select2:unselect', handle_option_change);\n});\n"],"names":["__webpack_exports__","jQuery","$","ilj_select2","minimumResultsForSearch","width","tags","tokenSeparators","func","delay","timeout_id","handle_option_change","e","selected_values","currentTarget","find","each","push","this","val","next","focus","spinner","closest","addClass","ajax","url","data","type","keywords","always","removeClass","context","args","arguments","clearTimeout","setTimeout","apply","on"],"sourceRoot":""}