ProShell v2.0
Dashboard
Server Info
Server: 158.106.128.192
PHP: 8.2.33
home
planet5
public_html
bansibaba.com
wp-includes
2026-09-16 23:31:38
Editing: indexation.js
Cancel
Save Changes
(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,s=window.jQuery;var n=e.n(s);const i=window.wp.i18n,r=window.yoast.componentsNew,o=window.yoast.styleGuide,a=window.yoast.propTypes;var d=e.n(a);class c extends Error{constructor(e,t,s,n,i,r={}){var o,a;super(e),this.name="RequestError",this.url=t,this.method=s,this.statusCode=n,this.stackTrace=i,this.objectId=null!==(o=r.objectId)&&void 0!==o?o:null,this.objectType=null!==(a=r.objectType)&&void 0!==a?a:null}}class l extends Error{constructor(e,t){super(e),this.name="ParseError",this.parseString=t}}const p="idle",h="in_progress",g="errored",x="completed";class u extends t.Component{constructor(e){super(e),this.settings=yoastIndexingData,this.state={state:p,processed:0,error:null,amount:parseInt(this.settings.amount,10),firstTime:"1"===this.settings.firstTime},this.startIndexing=this.startIndexing.bind(this),this.stopIndexing=this.stopIndexing.bind(this)}getAlreadyIndexedStateName(){return"completed"}async doIndexingRequest(e,t){const s=await fetch(e,{method:"POST",headers:{"X-WP-Nonce":t}}),n=await s.text();let i;try{i=JSON.parse(n)}catch(e){throw new l("Error parsing the response to JSON.",n)}if(!s.ok){const t=i.data||{};throw new c(i.message,e,"POST",s.status,t.stackTrace,{objectId:t.object_id,objectType:t.object_type})}return i}async doPreIndexingAction(e){"function"==typeof this.props.preIndexingActions[e]&&await this.props.preIndexingActions[e](this.settings)}async doPostIndexingAction(e,t){"function"==typeof this.props.indexingActions[e]&&await this.props.indexingActions[e](t.objects,this.settings)}async doIndexing(e){let s=this.settings.restApi.root+this.settings.restApi.indexing_endpoints[e];for(;this.isState(h)&&!1!==s;)try{await this.doPreIndexingAction(e);const n=await this.doIndexingRequest(s,this.settings.restApi.nonce);await this.doPostIndexingAction(e,n),(0,t.flushSync)(()=>{this.setState(e=>({processed:e.processed+n.objects.length,firstTime:!1}))}),s=n.next_url}catch(e){(0,t.flushSync)(()=>{this.setState({state:g,error:e,firstTime:!1})})}}async index(){for(const e of Object.keys(this.settings.restApi.indexing_endpoints))await this.doIndexing(e);this.isState(g)||this.isState(p)||this.completeIndexing()}async startIndexing(){this.setState({processed:0,state:h},this.index)}completeIndexing(){this.setState({state:x})}stopIndexing(){this.setState(e=>({state:p,processed:0,amount:e.amount-e.processed}))}componentDidMount(){var e,t;if(!this.settings.disabled&&(this.props.indexingStateCallback(0===this.state.amount?this.getAlreadyIndexedStateName():this.state.state),"true"===new URLSearchParams(window.location.search).get("start-indexation"))){const s=function(e){const t=new URL(e);return t.searchParams.delete("start-indexation"),t.href}(window.location.href);e=document.title,t=s,window.history.pushState(null,e,t),this.startIndexing()}}componentDidUpdate(e,t){this.state.state!==t.state&&this.props.indexingStateCallback(this.state.state)}isState(e){return this.state.state===e}}const w={indexingActions:d().object,preIndexingActions:d().object,indexingStateCallback:d().func},y={indexingActions:{},preIndexingActions:{},indexingStateCallback:()=>{}};u.propTypes=w,u.defaultProps=y;const m=u,j=window.yoast.helpers,S=window.ReactJSXRuntime,{stripTagsFromHtmlString:I}=j.strings,_=["a","p"];function f({title:e,value:t=""}){return t?(0,S.jsxs)("p",{children:[(0,S.jsx)("strong",{children:e}),(0,S.jsx)("br",{}),t]}):null}function b({title:e,value:t=""}){return t?(0,S.jsxs)("details",{children:[(0,S.jsx)("summary",{children:e}),(0,S.jsx)("pre",{style:{overflowX:"scroll",maxWidth:"500px",border:"1px solid",padding:"16px"},children:t})]}):null}function A({message:e,error:t}){let s="";return t.objectType&&(s=t.objectId?`${t.objectType} #${t.objectId}`:t.objectType),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{dangerouslySetInnerHTML:{__html:I(e,_)}}),(0,S.jsxs)("details",{children:[(0,S.jsx)("summary",{children:(0,i.__)("Error details","wordpress-seo")}),(0,S.jsxs)("div",{style:{marginTop:"8px"},children:[(0,S.jsx)(f,{title:(0,i.__)("Failing object","wordpress-seo"),value:s}),(0,S.jsx)(f,{title:(0,i.__)("Request URL","wordpress-seo"),value:t.url}),(0,S.jsx)(f,{title:(0,i.__)("Request method","wordpress-seo"),value:t.method}),(0,S.jsx)(f,{title:(0,i.__)("Status code","wordpress-seo"),value:t.statusCode}),(0,S.jsx)(f,{title:(0,i.__)("Error message","wordpress-seo"),value:t.message}),(0,S.jsx)(b,{title:(0,i.__)("Response","wordpress-seo"),value:t.parseString}),(0,S.jsx)(b,{title:(0,i.__)("Error stack trace","wordpress-seo"),value:t.stackTrace})]})]})]})}function T({message:e,error:t}){return(0,S.jsx)(r.Alert,{type:"error",children:(0,S.jsx)(A,{message:e,error:t})})}f.propTypes={title:d().string.isRequired,value:d().any},b.propTypes={title:d().string.isRequired,value:d().string},A.propTypes={message:d().string.isRequired,error:d().oneOfType([d().instanceOf(Error),d().instanceOf(c)]).isRequired},T.propTypes={message:d().string.isRequired,error:d().oneOfType([d().instanceOf(Error),d().instanceOf(c)]).isRequired};class v extends m{renderFirstIndexationNotice(){return(0,S.jsx)(r.Alert,{type:"info",children:(0,i.__)("This feature includes and replaces the Text Link Counter and Internal Linking Analysis","wordpress-seo")})}renderStartButton(){return(0,S.jsx)(r.NewButton,{variant:"primary",onClick:this.startIndexing,children:(0,i.__)("Start SEO data optimization","wordpress-seo")})}renderStopButton(){return(0,S.jsx)(r.NewButton,{variant:"secondary",onClick:this.stopIndexing,children:(0,i.__)("Stop SEO data optimization","wordpress-seo")})}renderDisabledTool(){return(0,S.jsxs)(t.Fragment,{children:[(0,S.jsx)("p",{children:(0,S.jsx)(r.NewButton,{variant:"secondary",disabled:!0,children:(0,i.__)("Start SEO data optimization","wordpress-seo")})}),(0,S.jsx)(r.Alert,{type:"info",children:(0,i.__)("SEO data optimization is disabled for non-production environments.","wordpress-seo")})]})}renderProgressBar(){return(0,S.jsxs)(t.Fragment,{children:[(0,S.jsx)(r.ProgressBar,{style:{height:"16px",margin:"8px 0"},progressColor:o.colors.$color_pink_dark,max:parseInt(this.state.amount,10),value:this.state.processed}),(0,S.jsx)("p",{style:{color:o.colors.$palette_grey_text},children:(0,i.__)("Optimizing SEO data… This may take a while.","wordpress-seo")})]})}renderErrorAlert(){return(0,S.jsx)(T,{message:yoastIndexingData.errorMessage,error:this.state.error})}renderTool(){return(0,S.jsxs)(t.Fragment,{children:[this.isState(h)&&this.renderProgressBar(),this.isState(g)&&this.renderErrorAlert(),this.isState(p)&&this.state.firstTime&&this.renderFirstIndexationNotice(),this.isState(h)?this.renderStopButton():this.renderStartButton()]})}render(){return this.settings.disabled?this.renderDisabledTool():this.isState(x)||0===this.state.amount?(0,S.jsx)(r.Alert,{type:"success",children:(0,i.__)("SEO data optimization complete","wordpress-seo")}):this.renderTool()}}v.propTypes=w,v.defaultProps=y;const O=v;let E;function P(){var e;null===(e=E)||void 0===e||e.render((0,S.jsx)(O,{preIndexingActions:window.yoast.indexing.preIndexingActions,indexingActions:window.yoast.indexing.indexingActions}))}window.yoast=window.yoast||{},window.yoast.indexing=window.yoast.indexing||{},window.yoast.indexing.preIndexingActions={},window.yoast.indexing.indexingActions={},window.yoast.indexing.registerPreIndexingAction=(e,t)=>{window.yoast.indexing.preIndexingActions[e]=t,P()},window.yoast.indexing.registerIndexingAction=(e,t)=>{window.yoast.indexing.indexingActions[e]=t,P()},n()(function(){const e=document.getElementById("yoast-seo-indexing-action");e&&(E=(0,t.createRoot)(e)),P()})})();
Upload Files
Cancel
Upload
Create New
Cancel
Create
Change Permissions
Cancel
Save
Change Date
Cancel
Save
Rename Item
Cancel
Save
Confirm Delete
Are you sure you want to delete the selected items?
Cancel
Delete