PageSourceSearch

https://bluestep.net/jslib/common_js.jsp?_id=120060___153427

js bluestep.net collected 2026-09-26 14:30:56 UTC 7,038 bytes, 233 lines download raw bytes

1var APP_ID = "120060___153427";
2var APP_ROOT = "";
3var B6P_VERSION = "26.09.22.01";
4<!-- Could aslo be change in the future if static resources are ever pushed to a CDN -->
5var BASE_STATIC_RESOURCE = "/static/" + B6P_VERSION;
6var IMG_ROOT = APP_ROOT + BASE_STATIC_RESOURCE + "/images/";
7var MEDIA_LIBRARY_KEY = "530003___1079368";
8var HELP_MEDIA_LIBRARY_KEY = "530003_global__126340";
9var PAGE_OBJECT_ID = "120060___153427";
10var USE_GLOBAL_IDS = false;
11var CURRENT_LAYOUT_TYPE = "" || null;
12var ORG_U = "U137143";
13function isLayoutType(type) {
14return CURRENT_LAYOUT_TYPE === type;
15}
16
17var PRIMARY_COLOR = "#395D6B";
18var PRIMARY_COLOR_HIGH = "#c0ccd0";
19var PRIMARY_COLOR_LOW = "#afafaf";
20var SECONDARY_COLOR = "#DED79C";
21var SECONDARY_COLOR_HIGH = "#f4f2df";
22var SECONDARY_COLOR_LOW = "#98936b";
23var ACCENT_1_COLOR = "#F77118";
24var ACCENT_2_COLOR = "#0069A5";
25var BODY_COLOR = "#FFFFFF";
26var TIME_OFFSET = 1790433056274 - (new Date()).getTime();
27function sysMillis() { return (new Date()).getTime() + TIME_OFFSET; }
28function currentDateTime(){
29var d = new Date();
30d.setTime(d.getTime() + TIME_OFFSET);
31return d;
32}
33
34var UNCHANGED_FIELD_VALUE = "`Not~Changed'"
35var ACTION_OVERRIDE = "_actionOverride";
36function processSubmitParams(curFormObj, event, url){
37if (!bsCheck.testSubmit(curFormObj, event, url)) return false;
38if(url != null) curFormObj.setAction(url);
39var eventElement = curFormObj.getElement("_postEvent");
40if(eventElement != null){
41if(event != null) eventElement.set(event);
42var actionOverride = curFormObj.getElement(ACTION_OVERRIDE);
43if(actionOverride != null && actionOverride.get() > "" && eventElement.get() == "commit"){
44curFormObj.setAction(actionOverride.get());
45}
46}
47}
48
49var _ERROR_REPORTER_;
50function b6p_sleep(ms) {
51return new Promise(resolve => setTimeout(resolve, ms));
52}
53async function waitSession() {
54if(_ERROR_REPORTER_ || "https:" == window.location.href.substring(0,6))	{
55while (true) {
56await b6p_sleep(3240000);
57try {
58await (await fetch("/keep-alive")).text();
59} catch (error) {
60console.error("Error during keep-alive fetch:", error);
61// Retry after a short delay
62await b6p_sleep(5000);
63}
64}
65}
66}
67
68waitSession();
69
70var _CM_;
71var bsCheck = {
72data: {},
73uidE: null,
74allowSubmit: false,
75origDoSubmit: null,
76submitEvent: null,
77submitURL: null,
78submitForm: null,
79showing: false,
80init: function() {
81if (_ERROR_REPORTER_) {
82this.uidE = document.querySelector('[name="_uniqueFormId"]');
83if (this.uidE) this.doCheck();
84}
85},
86doCheck: function() {
87const fName = bsCheck.uidE ? bsCheck.uidE.closest('form').name : null;
88if (fName) {
89var d = bsCheck.data[fName];
90if (!d) d = bsCheck.data[fName] = {first:true, mssg:"", stCheck:0, endCheck:0};
91if (!d.done && !d.mssg && d.endCheck >= d.stCheck) {
92d.stCheck = sysMillis();
93const formData = new FormData();
94formData.append('uid', bsCheck.uidE.value);
95formData.append('d', d.stCheck);
96
97fetch('/checkuid', {
98method: 'POST',
99body: formData
100})
101.then(response => response.json())
102.then(data => {
103d.endCheck = sysMillis();
104d.mssg = data.mssg;
105bsCheck.processCheck(fName);
106})
107.catch(() => {
108// A failed check says nothing about whether the POST would have succeeded, so it
109// must not be what decides the submit's fate. Holding the submit back here turns
110// a transient failure -- a reset during a rolling restart, a 502, any non-JSON
111// body, since response.json() rejects on an error page -- into silent data loss:
112// the Save click does nothing, the page still looks normal, and nothing is
113// recorded on either side. Fail open and let the commit path be the authority; it
114// checks the playback id again and refuses with FAILED_UNIQUE_ID_PERSIST if it is
115// stale, which also leaves the server-side trace this path otherwise never has.
116// mssg stays blank, so processCheck dispatches a pending submit and otherwise
117// reschedules the poll -- dead-ending here also stopped polling for good.
118console.warn('checkuid: pre-submit check failed, proceeding without it');
119d.endCheck = sysMillis();
120bsCheck.processCheck(fName);
121});
122}
123}
124},
125processCheck : function(fName) {
126var t = this, d = t.data[fName];
127if (t.submitForm) {
128d.endCheck = sysMillis() + 10000;
129submitForm(t.submitForm, t.submitEvent, t.submitURL);
130} else if (d.mssg) {
131if (d.first) {
132t.doReload();
133} else {
134t.showMssg(fName);
135}
136} else {
137setTimeout(t.doCheck, 15000);
138}
139d.first = false;
140},
141testSubmit: function(formObj, event, url) {
142var t = this, fName = formObj.name, d = t.data[fName];
143if (!d) return true;
144if (d.mssg) {
145var ev = event || formObj.getElement("_postEvent").get();
146if (t.allowSubmit || ev != "commit" || (_CM_ && !_CM_.fieldValueChanged)) {
147var u = url || curFormObj.element.action;
148if (!t.canReload(u)) return true;
149document.location = u;
150return false;
151}
152} else if (sysMillis() - d.endCheck < 1000) {
153d.stCheck = sysMillis() + 1000000;
154return true;
155}
156t.submitForm = fName
157t.submitEvent = event;
158t.submitURL = url;
159if (d.mssg) {
160t.showMssg(fName);
161} else {
162d.stCheck = d.endCheck = 0;
163t.doCheck();
164}
165return false;
166},
167canReload: function(url) {
168return url.indexOf("_event=") != -1 && (url.indexOf("_id=") != -1 || url.indexOf("_ancestorId=") != -1);
169},
170doReload: function() {
171this.doStay();
172if (this.canReload(document.location.search)) {
173if(_CM_) _CM_.allowLeave();
174document.location.replace(document.location.pathname + document.location.search);
175} else if (navigator.appName == 'Microsoft Internet Explorer') {
176alert("Oh no!  We are trying to help restart your edit, but Internet Explorer will not allow us with a multi-step edit.  "
177+ "You will have to do it manually by re-navigating to the first step in the edit process.");
178} else {
179if(_CM_) _CM_.allowLeave();
180history.back();
181}
182},
183doContinue: function() {
184var t = this;
185disableValidation();
186t.allowSubmit = true;
187submitForm(t.submitForm, t.submitEvent, t.submitURL);
188},
189doStay: function() {
190if (this.showing) {
191
192genericClose();
193
194this.showing = false;
195}
196this.submitForm = null;
197},
198
199
200
201
202showMssg: function(fName) {
203var t = this, d = t.data[fName];
204if (t.showing) {
205return;
206}
207
208if (popupWait) {
209template = '<style>.bsCheck li {padding-top:3px}\n.bsCheck li a{text-decoration:none}\n.bsCheck li a:hover{text-decoration:underline}\n</style>'
210+ '<div class="bsCheck" style="width:300px;padding:12px;background-color:white;border:4px solid black;border-radius:10px">'
211+ '<div style="text-align:center;font-size: 14pt">!</div><div style="margin:8px 0">'+(function(s){var d=document.createElement('div');d.textContent=s;return d.innerHTML})(d.mssg)+'</div>'
212+ '<b>Would you like to:</b><ul><li><a href="javascript:bsCheck.doReload()">Restart your edit and re-enter your changes.</a></li>'
213+ '<li><a href="javascript:bsCheck.doStay()">Stay on this page and handle it later.</a></li>'
214if (t.submitForm) {
215template += '<li><a href="javascript:bsCheck.doContinue()">Continue without saving.</a></li>'
216}
217template += '</ul></div>'
218popupWait('', template, 300, 180);
219t.showing = true;
220} else {
221alert(d.mssg);
222}
223
224}
225}
226document.addEventListener('DOMContentLoaded', function() {
227bsCheck.init();
228});
229
230
231
232var _SR_;
233if(_SR_ != null) _SR_.notify("common_js.jsp?_id=120060___153427");

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.