PageSourceSearch

https://semopenalex.org/assets/mp-event-target-redirect-9fad3de4048731515c77-bundle.js

js semopenalex.org collected 2026-10-02 07:23:43 UTC 2,628 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[17484],{4844(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectAction=void 0;const o=r(29093),n=r(58215),i=r(70796),c=r(94167),a=r(80099),s=r(94155),d=r(8469);class l extends o.Component{static contextType=i.EventContext;cancellation=new n.Cancellation;constructor(e){super(e),this.state={refresh:!1}}getEventContext(){return this.context}componentDidMount(){const{id:e,redirectOnLoad:t}=this.props,r=this.getEventContext();t?this.redirectOnLoad():this.cancellation.map(r.listen({eventType:d.RedirectActionPerform,target:e})).observe({value:e=>this.onRedirectEvent(e.data??{})})}redirectOnLoad(){const{action:e,queryParams:t,fragment:r}=this.props,o=function(e){switch(e){case"reload":case"redirect":return;default:return a.Rdf.iri(e)}}(e);if(!o)return void(0,s.addNotification)({level:"error",message:"Redirect action: missing resource IRI to navigate on load"});u(o,"redirect",f({},t),r)}onRedirectEvent=e=>{const{action:t,queryParams:r,moveParams:o,fragment:n}=this.props;if("redirect"===t&&!e.iri)return void(0,s.addNotification)({level:"error",message:"Redirect action: missing resource IRI to navigate to in the command event"});let i={};if(o){const e=new URLSearchParams((0,c.getCurrentUrl)().query());for(const t of o)e.has(t)&&(i[t]=e.get(t),e.delete(t));"reload"!==t&&(0,c.replaceUrlParams)(e)}i=f(i,r),i=f(i,e.queryParams);const d=n??e.fragment;u(a.Rdf.iri(e.iri),t,i,d)};componentWillUnmount(){this.cancellation.cancelAll()}render(){return null}}function f(e,t){if(!t)return e;const r={...e};for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const o=t[e];"string"==typeof o?r[e]=o:null===o&&delete r[e]}return r}function u(e,t,r,o){"reload"===t?(0,c.refresh)():"redirect"===t?(0,c.navigateToResource)(e,r,void 0,o).observe({}):(0,c.navigateToResource)(a.Rdf.iri(t),r,void 0,o).observe({})}t.RedirectAction=l,t.default=l},8469(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectActionPerform=void 0;const o=r(70796).EventMaker;t.RedirectActionPerform=o("RedirectAction.perform")},94155(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.clearNotifications=t.removeNotification=t.addNotification=void 0;const o=r(27527);var n=r(80477);Object.defineProperty(t,"addNotification",{enumerable:!0,get:function(){return n.addNotification}}),Object.defineProperty(t,"removeNotification",{enumerable:!0,get:function(){return n.removeNotification}}),Object.defineProperty(t,"clearNotifications",{enumerable:!0,get:function(){return n.clearNotifications}}),o.__exportStar(r(18642),t),o.__exportStar(r(38091),t)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.