File: /var/www/html/wp-content/plugins/advanced-ads/assets/dist/post-quick-edit.js.map
{"version":3,"file":"post-quick-edit.js","mappings":";;;;;;;;;;AAAA,kC;;;;;;;;;;ACAA,0C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WC5BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;ACN4B;AACgB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAASE,WAAWA,CAAEC,EAAE,EAAG;EAC1BF,2DAAQ,CAAE;IACTG,IAAI,EAAE,uCAAwCD,EAAE,UAAYE,MAAM,CAACC,WAAW,CAACC,eAAe,CAACC,KAAK,EAAG;IACvGC,MAAM,EAAE;EACT,CAAE,CAAC,CAACC,IAAI,CAAE,UAAWC,IAAI,EAAG;IAC3BC,kBAAkB,CAAET,EAAE,EAAEQ,IAAK,CAAC;EAC/B,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAAET,EAAE,EAAEQ,IAAI,EAAG;EACvC,MAAME,MAAM,GAAGb,6CAAM,CAAE,SAAUG,EAAE,EAAI,CAAC;EACxC,MAAMW,UAAU,GAAGD,MAAM,CAACE,IAAI,CAAE,6BAA8B,CAAC;EAC/DD,UAAU,CAACE,OAAO,CAAE,UAAW,CAAC,CAACC,IAAI,CAAE,UAAU,EAAE,KAAM,CAAC;EAC1DH,UAAU,CAACG,IAAI,CAAE,SAAS,EAAEC,OAAO,CAAEP,IAAI,CAACQ,WAAY,CAAE,CAAC;EACzD,MAAMC,SAAS,GAAGP,MAAM,CAACE,IAAI,CAAE,qCAAsC,CAAC;EACtE,IAAKK,SAAS,CAACC,MAAM,EAAG;IACvBD,SAAS,CACPH,IAAI,CAAE,UAAU,EAAE,KAAM,CAAC,CACzBA,IAAI,CAAE,SAAS,EAAEC,OAAO,CAAEP,IAAI,CAACW,mBAAoB,CAAE,CAAC;EACzD;AACD;AAEAtB,6CAAM,CAAE,YAAY;EACnB,MAAMuB,QAAQ,GAAGlB,MAAM,CAACmB,cAAc,CAACC,IAAI;;EAE3C;EACApB,MAAM,CAACmB,cAAc,CAACC,IAAI,GAAG,UAAWtB,EAAE,EAAG;IAC5C;IACA;IACAoB,QAAQ,CAACG,KAAK,CAAE,IAAI,EAAEC,SAAU,CAAC;;IAEjC;IACA,IAAK,QAAQ,KAAK,OAAOxB,EAAE,EAAG;MAC7BD,WAAW,CAAE0B,QAAQ,CAAE,IAAI,CAACC,KAAK,CAAE1B,EAAG,CAAE,CAAE,CAAC;IAC5C;EACD,CAAC;AACF,CAAE,CAAC,C","sources":["webpack://advanced-ads/external window \"jQuery\"","webpack://advanced-ads/external window [\"wp\",\"apiFetch\"]","webpack://advanced-ads/webpack/bootstrap","webpack://advanced-ads/webpack/runtime/compat get default export","webpack://advanced-ads/webpack/runtime/define property getters","webpack://advanced-ads/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-ads/webpack/runtime/make namespace object","webpack://advanced-ads/./src/admin/post-quick-edit/listing.js"],"sourcesContent":["module.exports = window[\"jQuery\"];","module.exports = window[\"wp\"][\"apiFetch\"];","// 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// Check if module exists (development only)\n\tif (__webpack_modules__[moduleId] === undefined) {\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\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 = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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 jQuery from 'jquery';\r\nimport apiFetch from '@wordpress/api-fetch';\r\n\r\n/**\r\n * Get disabled ads status\r\n *\r\n * @param {number} id\r\n */\r\nfunction getPostData( id ) {\r\n\tapiFetch( {\r\n\t\tpath: `/advanced-ads/v1/page_quick_edit?id=${ id }&nonce=${ window.advancedAds.page_quick_edit.nonce }`,\r\n\t\tmethod: 'GET',\r\n\t} ).then( function ( data ) {\r\n\t\tsetQuickEditValues( id, data );\r\n\t} );\r\n}\r\n\r\n/**\r\n * Update checkboxes states upon click on a quick edit link\r\n *\r\n * @param {number} id\r\n * @param {Object} data\r\n */\r\nfunction setQuickEditValues( id, data ) {\r\n\tconst theRow = jQuery( `#edit-${ id }` );\r\n\tconst disableAds = theRow.find( '[name=\"advads-disable-ads\"]' );\r\n\tdisableAds.closest( 'fieldset' ).prop( 'disabled', false );\r\n\tdisableAds.prop( 'checked', Boolean( data.disable_ads ) );\r\n\tconst inContent = theRow.find( '[name=\"advads-disable-the-content\"]' );\r\n\tif ( inContent.length ) {\r\n\t\tinContent\r\n\t\t\t.prop( 'disabled', false )\r\n\t\t\t.prop( 'checked', Boolean( data.disable_the_content ) );\r\n\t}\r\n}\r\n\r\njQuery( function () {\r\n\tconst editCopy = window.inlineEditPost.edit;\r\n\r\n\t// Replace the default WP function\r\n\twindow.inlineEditPost.edit = function ( id ) {\r\n\t\t/* eslint-enable no-undef */\r\n\t\t// Call the original WP edit function.\r\n\t\teditCopy.apply( this, arguments );\r\n\r\n\t\t// Now we do our stuff.\r\n\t\tif ( 'object' === typeof id ) {\r\n\t\t\tgetPostData( parseInt( this.getId( id ) ) );\r\n\t\t}\r\n\t};\r\n} );\r\n"],"names":["jQuery","apiFetch","getPostData","id","path","window","advancedAds","page_quick_edit","nonce","method","then","data","setQuickEditValues","theRow","disableAds","find","closest","prop","Boolean","disable_ads","inContent","length","disable_the_content","editCopy","inlineEditPost","edit","apply","arguments","parseInt","getId"],"sourceRoot":""}