if (typeof spider === 'undefined') { var spider = {}; } spider.windowTheme = "flat"; spider.gadgetTheme = "flat"; spider.dpiAware = 1; function spider_file_CheckId(a){spider.debug.CheckId(spider_file_CheckId.caller.name,"File",a)}function spider_file_CheckObject(a){spider.debug.CheckObject(spider_file_CheckObject.caller.name,"File",spider_IsFile(a))}function spider_CloseFile_DEBUG(a){-1!==a&&spider_file_CheckObject(a);return spider_CloseFile(a)}function spider_ReadFile_DEBUG(a,b,c,d){spider_file_CheckId(a);return spider_ReadFile(a,b,c,d)} function spider_OpenFile_DEBUG(a,b,c,d){spider_file_CheckId(a);return spider_OpenFile(a,b,c,d)}function spider_Loc_DEBUG(a){spider_file_CheckObject(a);return spider_Loc(a)}function spider_Lof_DEBUG(a){spider_file_CheckObject(a);return spider_Lof(a)}function spider_ReadData_DEBUG(a,b,c,d){spider_file_CheckObject(a);return spider_ReadData(a,b,c,d)}function spider_ReadByte_DEBUG(a){spider_file_CheckObject(a);return spider_ReadByte(a)} function spider_ReadAsciiCharacter_DEBUG(a){spider_file_CheckObject(a);return spider_ReadAsciiCharacter(a)}function spider_ReadUnicodeCharacter_DEBUG(a){spider_file_CheckObject(a);return spider_ReadUnicodeCharacter(a)}function spider_ReadWord_DEBUG(a){spider_file_CheckObject(a);return spider_ReadWord(a)}function spider_ReadLong_DEBUG(a){spider_file_CheckObject(a);return spider_ReadLong(a)}function spider_ReadInteger_DEBUG(a){spider_file_CheckObject(a);return spider_ReadInteger(a)} function spider_ReadQuad_DEBUG(a){spider_file_CheckObject(a);return spider_ReadQuad(a)}function spider_ReadFloat_DEBUG(a){spider_file_CheckObject(a);return spider_ReadFloat(a)}function spider_ReadDouble_DEBUG(a){spider_file_CheckObject(a);return spider_ReadDouble(a)}function spider_ReadCharacter_DEBUG(a,b){spider_file_CheckObject(a);return spider_ReadCharacter(a,b)}function spider_ReadString_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_ReadString(a,b,c)} function spider_ReadStringFormat_DEBUG(a){spider_file_CheckObject(a);return spider_ReadStringFormat(a)}function spider_WriteByte_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteByte(a,b)}function spider_WriteAsciiCharacter_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteAsciiCharacter(a,b)}function spider_WriteUnicodeCharacter_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteUnicodeCharacter(a,b)} function spider_WriteWord_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteWord(a,b)}function spider_WriteLong_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteLong(a,b)}function spider_WriteFloat_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteFloat(a,b)}function spider_WriteDouble_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteDouble(a,b)}function spider_WriteInteger_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteInteger(a,b)} function spider_WriteQuad_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteQuad(a,b)}function spider_WriteString_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_WriteString(a,b,c)}function spider_WriteStringN_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_WriteStringN(a,b,c)}function spider_WriteStringFormat_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteStringFormat(a,b)} function spider_WriteCharacter_DEBUG(a,b,c){"undefined"===typeof c&&(c=2);spider_file_CheckObject(a);return spider_WriteCharacter(a,b,c)}function spider_FetchData_DEBUG(a,b){spider_file_CheckObject(a);return spider_FetchData(a,b)}function spider_FileProgress_DEBUG(a){spider_file_CheckObject(a);return spider_FileProgress(a)}function spider_FileSeek_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_FileSeek(a,b,c)}function spider_Eof_DEBUG(a){spider_file_CheckObject(a);return spider_Eof(a)} function spider_CreateFile_DEBUG(a,b,c,d){spider_file_CheckId(a);return spider_CreateFile(a,b,c,d)}function spider_WriteData_DEBUG(a,b,c,d){spider_file_CheckObject(a);return spider_WriteData(a,b,c,d)}function spider_ExportFile_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_ExportFile(a,b,c)}function spider_ExportFileMemory_DEBUG(a){spider_file_CheckObject(a);return spider_ExportFileMemory(a)}function spider_IsFile_DEBUG(a){return spider_IsFile(a)} function spider_FileID_DEBUG(a){spider_file_CheckObject(a);return spider_FileID(a)}; function spider_HTTPRequest_DEBUG(a,b,c,d,e,f){return spider_HTTPRequest(a,b,c,d,e,f)}function spider_URLEncoder_DEBUG(a){return spider_URLEncoder(a)}function spider_URLDecoder_DEBUG(a){return spider_URLDecoder(a)}; function spider_MessageRequester_DEBUG(b,a){"undefined"===typeof a&&(a=0);spider.debug.CheckSingleFlags("Flags",a,[0,4]);return spider_MessageRequester(b,a)}function spider_InputRequester_DEBUG(b,a){return spider_InputRequester(b,a)}function spider_OpenFileRequester_DEBUG(b,a,c){"undefined"===typeof c&&(c=0);spider.debug.CheckCombinationFlags("Flags",c,[1]);return spider_OpenFileRequester(b,a,c)}function spider_NextSelectedFile_DEBUG(){return spider_NextSelectedFile()} function spider_SelectedFileName_DEBUG(){return spider_SelectedFileName()}function spider_SelectedFileID_DEBUG(){return spider_SelectedFileID()}; function spider_cipher_CheckId(a){spider.debug.CheckId(spider_cipher_CheckId.caller.name,"Cipher",a)}function spider_cipher_CheckObject(a){spider.debug.CheckObject(spider_cipher_CheckObject.caller.name,"Cipher",spider_IsCipher(a))}function spider_fingerprint_CheckId(a){spider.debug.CheckId(spider_fingerprint_CheckId.caller.name,"Fingerprint",a)}function spider_fingerprint_CheckObject(a){spider.debug.CheckObject(spider_fingerprint_CheckObject.caller.name,"Fingerprint",spider_IsFingerprint(a))} function spider_StartAESCipher_DEBUG(a,c,b,d,e){spider_cipher_CheckId(a);128!=b&&192!=b&&256!=b&&spider.debug.Error("The key size for AES has to be 128, 192 or 256.");spider.debug.CheckSingleFlags("Mode",e,[0,5,6,9,10]);return spider_StartAESCipher(a,c,b,d,e)}function spider_AddCipherBuffer_DEBUG(a,c,b,d,e,g){spider_cipher_CheckObject(a);return spider_AddCipherBuffer(a,c,b,d,e,g)}function spider_FinishCipher_DEBUG(a){spider_cipher_CheckObject(a);return spider_FinishCipher(a)} function spider_AESEncoder_DEBUG(a,c,b,d,e,g,f,k,h){"undefined"===typeof h&&(h=4);128!=f&&192!=f&&256!=f&&spider.debug.Error("The key size for AES has to be 128, 192 or 256.");spider.debug.CheckSingleFlags("Mode",h,[4,8]);return spider_AESEncoder(a,c,b,d,e,g,f,k,h)} function spider_AESDecoder_DEBUG(a,c,b,d,e,g,f,k,h){"undefined"===typeof h&&(h=4);128!=f&&192!=f&&256!=f&&spider.debug.Error("The key size for AES has to be 128, 192 or 256.");spider.debug.CheckSingleFlags("Mode",h,[4,8]);return spider_AESDecoder(a,c,b,d,e,g,f,k,h)} function spider_StartFingerprint_DEBUG(a,c,b){"undefined"===typeof b&&(b=256);spider_fingerprint_CheckId(a);224!=b&&256!=b&&384!=b&&512!=b&&spider.debug.Error("The bits number for fingerprint has to be 224, 256, 384 or 512.");return spider_StartFingerprint(a,c,b)}function spider_AddFingerprintBuffer_DEBUG(a,c,b,d){spider_fingerprint_CheckObject(a);return spider_AddFingerprintBuffer(a,c,b,d)} function spider_FinishFingerprint_DEBUG(a){spider_fingerprint_CheckObject(a);return spider_FinishFingerprint(a)}function spider_StringFingerprint_DEBUG(a,c,b){"undefined"===typeof b&&(b=256);224!=b&&256!=b&&384!=b&&512!=b&&spider.debug.Error("The bits number for fingerprint has to be 224, 256, 384 or 512.");return spider_StringFingerprint(a,c,b)} function spider_Fingerprint_DEBUG(a,c,b,d,e){"undefined"===typeof e&&(e=256);224!=e&&256!=e&&384!=e&&512!=e&&spider.debug.Error("The bits number for fingerprint has to be 224, 256, 384 or 512.");return spider_Fingerprint(a,c,b,d,e)}function spider_IsFingerprint_DEBUG(a){return spider_IsFingerprint(a)}function spider_IsCipher_DEBUG(a){return spider_IsCipher(a)} function spider_Base64EncoderBuffer_DEBUG(a,c,b,d,e,g,f){"undefined"===typeof f&&(f=0);spider.debug.CheckCombinationFlags("Flags",f,[32,16]);return spider_Base64EncoderBuffer(a,c,b,d,e,g,f)}function spider_Base64DecoderBuffer_DEBUG(a,c,b,d,e,g){return spider_Base64DecoderBuffer(a,c,b,d,e,g)}function spider_Base64Encoder_DEBUG(a,c,b,d){"undefined"===typeof d&&(d=0);spider.debug.CheckCombinationFlags("Flags",d,[32,16]);return spider_Base64Encoder(a,c,b,d)} function spider_Base64Decoder_DEBUG(a,c,b,d){return spider_Base64Decoder(a,c,b,d)}; function spider_gadget_CheckId(a){spider.debug.CheckId(spider_gadget_CheckId.caller.name,"Gadget",a)}function spider_gadget_CheckObject(a){spider.debug.CheckObject(spider_gadget_CheckObject.caller.name,"Gadget",spider_IsGadget(a))}function spider_InitGadget_DEBUG(){return spider_InitGadget()}function spider_FreeGadget_DEBUG(a){-1!==a&&spider_gadget_CheckObject(a);return spider_FreeGadget(a)} function spider_ButtonGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_ButtonGadget(a,b,c,d,e,f,g)}function spider_ButtonImageGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_ButtonImageGadget(a,b,c,d,e,f,g)}function spider_CalendarGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_CalendarGadget(a,b,c,d,e,f,g)}function spider_CanvasGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_CanvasGadget(a,b,c,d,e,f)} function spider_CheckBoxGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_CheckBoxGadget(a,b,c,d,e,f,g)}function spider_ComboBoxGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_ComboBoxGadget(a,b,c,d,e,f)}function spider_ContainerGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_ContainerGadget(a,b,c,d,e,f)}function spider_DateGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_DateGadget(a,b,c,d,e,f,g,h)} function spider_EditorGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_EditorGadget(a,b,c,d,e,f)}function spider_FrameGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_FrameGadget(a,b,c,d,e,f,g)}function spider_HyperLinkGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_HyperLinkGadget(a,b,c,d,e,f,g,h)}function spider_ImageGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_ImageGadget(a,b,c,d,e,f,g)} function spider_ListViewGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_ListViewGadget(a,b,c,d,e,f)}function spider_ListIconGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_ListIconGadget(a,b,c,d,e,f,g,h)}function spider_OptionGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_OptionGadget(a,b,c,d,e,f)}function spider_PanelGadget_DEBUG(a,b,c,d,e){spider_gadget_CheckId(a);return spider_PanelGadget(a,b,c,d,e)} function spider_ProgressBarGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_ProgressBarGadget(a,b,c,d,e,f,g,h)}function spider_ScrollAreaGadget_DEBUG(a,b,c,d,e,f,g,h,k){spider_gadget_CheckId(a);return spider_ScrollAreaGadget(a,b,c,d,e,f,g,h,k)}function spider_ScrollBarGadget_DEBUG(a,b,c,d,e,f,g,h,k){spider_gadget_CheckId(a);return spider_ScrollBarGadget(a,b,c,d,e,f,g,h,k)} function spider_SpinGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_SpinGadget(a,b,c,d,e,f,g,h)}function spider_SplitterGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_SplitterGadget(a,b,c,d,e,f,g,h)}function spider_StringGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_StringGadget(a,b,c,d,e,f,g)}function spider_TextGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_TextGadget(a,b,c,d,e,f,g)} function spider_TrackBarGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_TrackBarGadget(a,b,c,d,e,f,g,h)}function spider_TreeGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_TreeGadget(a,b,c,d,e,f)}function spider_WebGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_WebGadget(a,b,c,d,e,f,g)}function spider_CanvasOutput_DEBUG(a){spider_gadget_CheckObject(a);return spider_CanvasOutput(a)} function spider_CanvasVectorOutput_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_CanvasVectorOutput(a,b)}function spider_AddGadgetItem_DEBUG(a,b,c,d,e){spider_gadget_CheckObject(a);return spider_AddGadgetItem(a,b,c,d,e)}function spider_RemoveGadgetItem_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_RemoveGadgetItem(a,b)}function spider_ClearGadgetItems_DEBUG(a){spider_gadget_CheckObject(a);return spider_ClearGadgetItems(a)} function spider_CountGadgetItems_DEBUG(a){spider_gadget_CheckObject(a);return spider_CountGadgetItems(a)}function spider_AddGadgetColumn_DEBUG(a,b,c,d){spider_gadget_CheckObject(a);return spider_AddGadgetColumn(a,b,c,d)}function spider_RemoveGadgetColumn_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_RemoveGadgetColumn(a,b)}function spider_DisableGadget_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_DisableGadget(a,b)} function spider_BindGadgetEvent_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_BindGadgetEvent(a,b,c)}function spider_UnbindGadgetEvent_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_UnbindGadgetEvent(a,b,c)}function spider_UseGadgetList_DEBUG(a){return spider_UseGadgetList(a)}function spider_OpenGadgetList_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_OpenGadgetList(a,b)}function spider_CloseGadgetList_DEBUG(){return spider_CloseGadgetList()} function spider_GetActiveGadget_DEBUG(){return spider_GetActiveGadget()}function spider_SetActiveGadget_DEBUG(a){spider_gadget_CheckObject(a);return spider_SetActiveGadget(a)}function spider_GetGadgetState_DEBUG(a){spider_gadget_CheckObject(a);return spider_GetGadgetState(a)}function spider_SetGadgetState_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_SetGadgetState(a,b)}function spider_GetGadgetAttribute_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetAttribute(a,b)} function spider_SetGadgetAttribute_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetAttribute(a,b,c)}function spider_GetGadgetData_DEBUG(a){spider_gadget_CheckObject(a);return spider_GetGadgetData(a)}function spider_SetGadgetData_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_SetGadgetData(a,b)}function spider_GetGadgetText_DEBUG(a){spider_gadget_CheckObject(a);return spider_GetGadgetText(a)} function spider_SetGadgetText_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_SetGadgetText(a,b)}function spider_GetGadgetColor_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetColor(a,b)}function spider_SetGadgetColor_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetColor(a,b,c)}function spider_GetGadgetItemState_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetItemState(a,b)} function spider_SetGadgetItemState_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetItemState(a,b,c)}function spider_GetGadgetItemData_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetItemData(a,b)}function spider_SetGadgetItemData_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetItemData(a,b,c)}function spider_GetGadgetItemText_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_GetGadgetItemText(a,b,c)} function spider_SetGadgetItemText_DEBUG(a,b,c,d){spider_gadget_CheckObject(a);return spider_SetGadgetItemText(a,b,c,d)}function spider_GetGadgetItemAttribute_DEBUG(a,b,c,d){spider_gadget_CheckObject(a);return spider_GetGadgetItemAttribute(a,b,c,d)}function spider_SetGadgetItemAttribute_DEBUG(a,b,c,d,e){spider_gadget_CheckObject(a);return spider_SetGadgetItemAttribute(a,b,c,d,e)}function spider_SetGadgetItemImage_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetItemImage(a,b,c)} function spider_SetGadgetFont_DEBUG(a,b){-1!==a&&spider_gadget_CheckObject(a);return spider_SetGadgetFont(a,b)}function spider_HideGadget_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_HideGadget(a,b)}function spider_ResizeGadget_DEBUG(a,b,c,d,e){spider_gadget_CheckObject(a);return spider_ResizeGadget(a,b,c,d,e)}function spider_GadgetType_DEBUG(a){spider_gadget_CheckObject(a);return spider_GadgetType(a)} function spider_GadgetHeight_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetHeight(a,b)}function spider_GadgetWidth_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetWidth(a,b)}function spider_GadgetToolTip_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetToolTip(a,b)}function spider_GadgetX_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetX(a,b)}function spider_GadgetY_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetY(a,b)} function spider_GadgetID_DEBUG(a){spider_gadget_CheckObject(a);return spider_GadgetID(a)}function spider_IsGadget_DEBUG(a){return spider_IsGadget(a)}; function spider_ResetPath_DEBUG(){return spider_ResetPath()}function spider_SaveVectorState_DEBUG(){return spider_SaveVectorState()}function spider_RestoreVectorState_DEBUG(){return spider_RestoreVectorState()}function spider_StartVectorDrawing_DEBUG(a){return spider_StartVectorDrawing(a)}function spider_StopVectorDrawing_DEBUG(){return spider_StopVectorDrawing()}function spider_IsPathEmpty_DEBUG(){return spider_IsPathEmpty()} function spider_ConvertCoordinateX_DEBUG(a,b,c,d){return spider_ConvertCoordinateX(a,b,c,d)}function spider_ConvertCoordinateY_DEBUG(a,b,c,d){return spider_ConvertCoordinateY(a,b,c,d)}function spider_MovePathCursor_DEBUG(a,b,c){return spider_MovePathCursor(a,b,c)}function spider_AddPathEllipse_DEBUG(a,b,c,d,e,f,g){return spider_AddPathEllipse(a,b,c,d,e,f,g)}function spider_AddPathCurve_DEBUG(a,b,c,d,e,f,g){return spider_AddPathCurve(a,b,c,d,e,f,g)} function spider_AddPathArc_DEBUG(a,b,c,d,e,f){return spider_AddPathArc(a,b,c,d,e,f)}function spider_AddPathCircle_DEBUG(a,b,c,d,e,f,g){return spider_AddPathCircle(a,b,c,d,e,f,g)}function spider_AddPathLine_DEBUG(a,b,c){return spider_AddPathLine(a,b,c)}function spider_AddPathBox_DEBUG(a,b,c,d,e){return spider_AddPathBox(a,b,c,d,e)}function spider_vectordrawing_ToPaperColor_DEBUG(a){return spider_vectordrawing_ToPaperColor(a)} function spider_VectorSourceColor_DEBUG(a){return spider_VectorSourceColor(a)}function spider_VectorSourceLinearGradient_DEBUG(a,b,c,d){return spider_VectorSourceLinearGradient(a,b,c,d)}function spider_VectorSourceCircularGradient_DEBUG(a,b,c){return spider_VectorSourceCircularGradient(a,b,c)}function spider_VectorSourceGradientColor_DEBUG(a,b){return spider_VectorSourceGradientColor(a,b)}function spider_ClosePath_DEBUG(){return spider_ClosePath()} function spider_StrokePath_DEBUG(a,b){return spider_StrokePath(a,b)}function spider_CustomDashPath_DEBUG(a,b,c,d){return spider_CustomDashPath(a,b,c,d)}function spider_DashPath_DEBUG(a,b,c,d){return spider_DashPath(a,b,c,d)}function spider_DotPath_DEBUG(a,b,c,d){return spider_DotPath(a,b,c,d)}function spider_AddPathSegments_DEBUG(a,b){return spider_AddPathSegments(a,b)}function spider_PathSegments_DEBUG(){return spider_PathSegments()}function spider_FillPath_DEBUG(a){return spider_FillPath(a)} function spider_BeginVectorLayer_DEBUG(a){return spider_BeginVectorLayer(a)}function spider_EndVectorLayer_DEBUG(){return spider_EndVectorLayer()}function spider_FillVectorOutput_DEBUG(){return spider_FillVectorOutput()}function spider_IsInsidePath_DEBUG(a,b,c){return spider_IsInsidePath(a,b,c)}function spider_IsInsideStroke_DEBUG(a,b,c){return spider_IsInsideStroke(a,b,c)}function spider_PathBoundsX_DEBUG(){return spider_PathBoundsX()} function spider_PathBoundsY_DEBUG(){return spider_PathBoundsY()}function spider_PathBoundsWidth_DEBUG(){return spider_PathBoundsWidth()}function spider_PathBoundsHeight_DEBUG(){return spider_PathBoundsHeight()}function spider_PathLength_DEBUG(){return spider_PathLength()}function spider_PathPointX_DEBUG(a){return spider_PathPointX(a)}function spider_PathPointY_DEBUG(a){return spider_PathPointY(a)}function spider_PathPointAngle_DEBUG(a){return spider_PathPointAngle(a)} function spider_VectorFont_DEBUG(a,b){return spider_VectorFont(a,b)}function spider_DrawVectorText_DEBUG(a){return spider_DrawVectorText(a)}function spider_VectorTextWidth_DEBUG(a,b){return spider_VectorTextWidth(a,b)}function spider_VectorTextHeight_DEBUG(a,b){return spider_VectorTextHeight(a,b)}function spider_VectorUnit_DEBUG(){return spider_VectorUnit()}function spider_DrawVectorImage_DEBUG(a,b,c,d){return spider_DrawVectorImage(a,b,c,d)} function spider_PathCursorX_DEBUG(){return spider_PathCursorX()}function spider_PathCursorY_DEBUG(){return spider_PathCursorY()}function spider_FlipCoordinatesX_DEBUG(a,b){return spider_FlipCoordinatesX(a,b)}function spider_ResetCoordinates_DEBUG(){return spider_ResetCoordinates()}function spider_RotateCoordinates_DEBUG(a,b,c,d){return spider_RotateCoordinates(a,b,c,d)}function spider_ScaleCoordinates_DEBUG(a,b,c){return spider_ScaleCoordinates(a,b,c)} function spider_TranslateCoordinates_DEBUG(a,b,c){return spider_TranslateCoordinates(a,b,c)}function spider_SkewCoordinates_DEBUG(a,b,c){return spider_SkewCoordinates(a,b,c)}function spider_VectorOutputWidth_DEBUG(){return spider_VectorOutputWidth()}function spider_VectorOutputHeight_DEBUG(){return spider_VectorOutputHeight()}function spider_VectorResolutionX_DEBUG(){return spider_VectorResolutionX()}function spider_VectorResolutionY_DEBUG(){return spider_VectorResolutionY()}; function spider_InitList_DEBUG(){return spider_InitList()}function spider_AddElement_DEBUG(a){return spider_AddElement(a)}function spider_InsertElement_DEBUG(a){return spider_InsertElement(a)}function spider_ListIndex_DEBUG(a){return spider_ListIndex(a)}function spider_LastElement_DEBUG(a){return spider_LastElement(a)}function spider_MergeLists_DEBUG(a,b,c){return spider_MergeLists(a,b,c)}function spider_MoveElement_DEBUG(a,b,c){return spider_MoveElement(a,b,c)} function spider_NextElement_DEBUG(a){return spider_NextElement(a)}function spider_PushListPosition_DEBUG(a){return spider_PushListPosition(a)}function spider_PopListPosition_DEBUG(a){return spider_PopListPosition(a)}function spider_PreviousElement_DEBUG(a){return spider_PreviousElement(a)}function spider_ResetList_DEBUG(a){return spider_ResetList(a)}function spider_ListSize_DEBUG(a){return spider_ListSize(a)}function spider_ChangeCurrentElement_DEBUG(a,b){return spider_ChangeCurrentElement(a,b)} function spider_CopyList_DEBUG(a,b,c,d){return spider_CopyList(a,b,c,d)}function spider_ClearList_DEBUG(a){return spider_ClearList(a)}function spider_DeleteElement_DEBUG(a,b){return spider_DeleteElement(a,b)}function spider_FreeList_DEBUG(a){return spider_FreeList(a)}function spider_FirstElement_DEBUG(a){return spider_FirstElement(a)}function spider_SelectElement_DEBUG(a,b){return spider_SelectElement(a,b)}function spider_SplitList_DEBUG(a,b,c){return spider_SplitList(a,b,c)} function spider_SwapElements_DEBUG(a,b,c){return spider_SwapElements(a,b,c)}; function spider_window_CheckId(a){spider.debug.CheckId(spider_window_CheckId.caller.name,"Window",a)}function spider_window_CheckObject(a){spider.debug.CheckObject(spider_window_CheckObject.caller.name,"Window",spider_IsWindow(a))}function spider_CloseWindow_DEBUG(a){-1!==a&&spider_window_CheckObject(a);return spider_CloseWindow(a)} function spider_OpenWindow_DEBUG(a,b,c,d,e,h,f,g){"undefined"===typeof f&&(f=16);"undefined"===typeof g&&(g=null);spider_window_CheckId(a);return spider_OpenWindow(a,b,c,d,e,h,f,g)}function spider_AddKeyboardShortcut_DEBUG(a,b,c){spider_window_CheckObject(a);return spider_AddKeyboardShortcut(a,b,c)}function spider_RemoveKeyboardShortcut_DEBUG(a,b){spider_window_CheckObject(a);return spider_RemoveKeyboardShortcut(a,b)} function spider_AddWindowTimer_DEBUG(a,b,c){spider_window_CheckObject(a);return spider_AddWindowTimer(a,b,c)}function spider_RemoveWindowTimer_DEBUG(a,b){spider_window_CheckObject(a);return spider_RemoveWindowTimer(a,b)}function spider_DisableWindow_DEBUG(a,b){spider_window_CheckObject(a);return spider_DisableWindow(a,b)} function spider_HideWindow_DEBUG(a,b,c){"undefined"===typeof c&&(c=0);spider_window_CheckObject(a);spider.debug.CheckCombinationFlags("Flags",c,[2048,1,2]);return spider_HideWindow(a,b,c)}function spider_GetWindowTitle_DEBUG(a){spider_window_CheckObject(a);return spider_GetWindowTitle(a)}function spider_SetWindowTitle_DEBUG(a,b){spider_window_CheckObject(a);return spider_SetWindowTitle(a,b)}function spider_GetWindowColor_DEBUG(a){spider_window_CheckObject(a);return spider_GetWindowColor(a)} function spider_SetWindowColor_DEBUG(a,b){spider_window_CheckObject(a);return spider_SetWindowColor(a,b)}function spider_GetWindowData_DEBUG(a){spider_window_CheckObject(a);return spider_GetWindowData(a)}function spider_SetWindowData_DEBUG(a,b){spider_window_CheckObject(a);return spider_SetWindowData(a,b)}function spider_GetActiveWindow_DEBUG(){return spider_GetActiveWindow()}function spider_SetActiveWindow_DEBUG(a){spider_window_CheckObject(a);return spider_SetActiveWindow(a)} function spider_StickyWindow_DEBUG(a,b){spider_window_CheckObject(a);return spider_StickyWindow(a,b)}function spider_ResizeWindow_DEBUG(a,b,c,d,e){spider_window_CheckObject(a);return spider_ResizeWindow(a,b,c,d,e)}function spider_WindowBounds_DEBUG(a,b,c,d,e){spider_window_CheckObject(a);return spider_WindowBounds(a,b,c,d,e)}function spider_WindowX_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowX(a,b)} function spider_WindowY_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowY(a,b)}function spider_WindowWidth_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowWidth(a,b)} function spider_WindowHeight_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowHeight(a,b)}function spider_WindowMouseX_DEBUG(a){spider_window_CheckObject(a);return spider_WindowMouseX(a)}function spider_WindowMouseY_DEBUG(a){spider_window_CheckObject(a);return spider_WindowMouseY(a)}function spider_WindowOpacity_DEBUG(a,b){spider_window_CheckObject(a);return spider_WindowOpacity(a,b)} function spider_WindowID_DEBUG(a){spider_window_CheckObject(a);return spider_WindowID(a)}function spider_IsWindow_DEBUG(a){return spider_IsWindow(a)}; function spider_2ddrawing_CheckCurrent(){null==spider.drawing.output&&spider.debug.Error("StartDrawing() must be called before using a 2D drawing command.",spider_2ddrawing_CheckCurrent.caller.name)}function spider_StartDrawing_DEBUG(a){return spider_StartDrawing(a)}function spider_Box_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Box(a,b,c,d,e)} function spider_DrawAlphaImage_DEBUG(a,b,c,d){"undefined"===typeof d&&(d=255);spider_2ddrawing_CheckCurrent();return spider_DrawAlphaImage(a,b,c,d)}function spider_DrawImage_DEBUG(a,b,c,d,e){spider_2ddrawing_CheckCurrent();return spider_DrawImage(a,b,c,d,e)}function spider_Plot_DEBUG(a,b,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Plot(a,b,c)}function spider_Point_DEBUG(a,b){spider_2ddrawing_CheckCurrent();return spider_Point(a,b)} function spider_OutputDepth_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_OutputDepth()}function spider_OutputWidth_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_OutputWidth()}function spider_OutputHeight_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_OutputHeight()}function spider_Line_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Line(a,b,c,d,e)} function spider_LineXY_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_LineXY(a,b,c,d,e)}function spider_DrawText_DEBUG(a,b,c,d,e){"undefined"===typeof d&&(d=spider.drawing.frontColor);"undefined"===typeof e&&(e=spider.drawing.backColor);spider_2ddrawing_CheckCurrent();return spider_DrawText(a,b,c,d,e)} function spider_Circle_DEBUG(a,b,c,d){"undefined"===typeof d&&(d=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Circle(a,b,c,d)}function spider_Ellipse_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Ellipse(a,b,c,d,e)}function spider_DrawingFont_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_DrawingFont(a)} function spider_DrawingMode_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_DrawingMode(a)}function spider_StopDrawing_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_StopDrawing()}function spider_RoundBox_DEBUG(a,b,c,d,e,f,g){spider_2ddrawing_CheckCurrent();return spider_RoundBox(a,b,c,d,e,f,g)}function spider_RGB_DEBUG(a,b,c){return spider_RGB(a,b,c)}function spider_RGBA_DEBUG(a,b,c,d){return spider_RGBA(a,b,c,d)}function spider_Red_DEBUG(a){return spider_Red(a)} function spider_Green_DEBUG(a){return spider_Green(a)}function spider_Blue_DEBUG(a){return spider_Blue(a)}function spider_Alpha_DEBUG(a){return spider_Alpha(a)}function spider_BackColor_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_BackColor(a)}function spider_FrontColor_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_FrontColor(a)}function spider_TextHeight_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_TextHeight(a)} function spider_TextWidth_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_TextWidth(a)}; function spider_image_CheckId(a){spider.debug.CheckId(spider_image_CheckId.caller.name,"Image",a)}function spider_image_CheckObject(a){spider.debug.CheckObject(spider_image_CheckObject.caller.name,"Image",spider_IsImage(a))}function spider_InitImage_DEBUG(){return spider_InitImage()}function spider_FreeImage_DEBUG(a){-1!==a&&spider_image_CheckObject(a);return spider_FreeImage(a)}function spider_LoadImage_DEBUG(a,b,c){spider_image_CheckId(a);return spider_LoadImage(a,b,c)} function spider_CopyImage_DEBUG(a,b){spider_image_CheckObject(a);spider_image_CheckId(b);return spider_CopyImage(a,b)}function spider_CreateImage_DEBUG(a,b,c,d,e){spider_image_CheckId(a);0>=b?spider.debug.Error("'With' is too small, must be greater than 0."):0>=c&&spider.debug.Error("'Height' is too small, must be greater than 0.");return spider_CreateImage(a,b,c,d,e)} function spider_GrabImage_DEBUG(a,b,c,d,e,f){spider_image_CheckObject(a);spider_image_CheckId(b);0>c?spider.debug.Error("'x' can't be negative."):0>d?spider.debug.Error("'y' can't be negative."):0>f?spider.debug.Error("'Height' can't be negative."):0>e&&spider.debug.Error("'Width' can't be negative.");return spider_GrabImage(a,b,c,d,e,f)}function spider_ImageOutput_DEBUG(a){spider_image_CheckObject(a);return spider_ImageOutput(a)} function spider_ImageVectorOutput_DEBUG(a,b){spider_image_CheckObject(a);return spider_ImageVectorOutput(a,b)}function spider_EncodeImage_DEBUG(a,b,c){spider_image_CheckObject(a);return spider_EncodeImage(a,b,c)}function spider_ExportImage_DEBUG(a,b,c){spider_image_CheckObject(a);return spider_ExportImage(a,b,c)}function spider_ImageDepth_DEBUG(a){spider_image_CheckObject(a);return spider_ImageDepth(a)}function spider_ImageFormat_DEBUG(a){spider_image_CheckObject(a);return spider_ImageFormat(a)} function spider_ImageWidth_DEBUG(a){spider_image_CheckObject(a);return spider_ImageWidth(a)}function spider_ImageHeight_DEBUG(a){spider_image_CheckObject(a);return spider_ImageHeight(a)}function spider_ResizeImage_DEBUG(a,b,c,d){spider_image_CheckObject(a);return spider_ResizeImage(a,b,c,d)}function spider_ImageID_DEBUG(a){spider_image_CheckObject(a);return spider_ImageID(a)}function spider_IsImage_DEBUG(a){return spider_IsImage(a)}; function spider_InitImageDecoder_DEBUG(){return spider_InitImageDecoder()}; function spider_FinishDirectory_DEBUG(a){return spider_FinishDirectory(a)}function spider_RequestFileSystem_DEBUG(a,b,c){return spider_RequestFileSystem(a,b,c)}function spider_ExamineDirectory_DEBUG(a,b,c,d){return spider_ExamineDirectory(a,b,c,d)}function spider_GetExtensionPart_DEBUG(a){return spider_GetExtensionPart(a)}; function spider_DesktopWidth_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopWidth(a)}function spider_DesktopHeight_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopHeight(a)}function spider_DesktopFrequency_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopFrequency(a)}function spider_DesktopMouseX_DEBUG(){return spider_DesktopMouseX()}function spider_DesktopMouseY_DEBUG(){return spider_DesktopMouseY()} function spider_DesktopX_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopX(a)}function spider_DesktopY_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopY(a)}function spider_ExamineDesktops_DEBUG(){return spider_ExamineDesktops()}function spider_DesktopDepth_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopDepth(a)} function spider_DesktopName_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopName(a)}; function spider_AddDate_DEBUG(b,a,c){spider.debug.CheckSingleFlags("Type",a,[0,1,2,3,4,5,6]);return spider_AddDate(b,a,c)}; function spider_Bin_DEBUG(a,b){return spider_Bin(a,b)}function spider_Chr_DEBUG(a){return spider_Chr(a)}function spider_FindString_DEBUG(a,b,c,d){return spider_FindString(a,b,c,d)}function spider_Space_DEBUG(a){return spider_Space(a)}function spider_Str_DEBUG(a){return spider_Str(a)}function spider_StrD_DEBUG(a,b){return spider_StrD(a,b)}function spider_StrF_DEBUG(a,b){return spider_StrF(a,b)}function spider_StrU_DEBUG(a,b){return spider_StrU(a,b)} function spider_LTrim_DEBUG(a,b){return spider_LTrim(a,b)}function spider_RTrim_DEBUG(a,b){return spider_RTrim(a,b)}function spider_Trim_DEBUG(a,b){return spider_Trim(a,b)}function spider_ReplaceString_DEBUG(a,b,c,d,e,f){return spider_ReplaceString(a,b,c,d,e,f)}function spider_RemoveString_DEBUG(a,b,c,d,e){return spider_RemoveString(a,b,c,d,e)}function spider_Hex_DEBUG(a,b){return spider_Hex(a,b)}function spider_StringField_DEBUG(a,b,c){return spider_StringField(a,b,c)} function spider_StringByteLength_DEBUG(a){return spider_StringByteLength(a)}; function spider_Random_DEBUG(b,a){"undefined"===typeof a&&(a=0);0>a&&spider.debug.Error("'Min' can't be negative.");0>b&&spider.debug.Error("'Max' can't be negative.");a>b&&spider.debug.Error("'Min' value can't be superior to 'Max' value.");return spider_Random(b,a)}; function spider_font_CheckId(a){spider.debug.CheckId(spider_font_CheckId.caller.name,"Font",a)}function spider_font_CheckObject(a){spider.debug.CheckObject(spider_font_CheckObject.caller.name,"Font",spider_IsFont(a))}function spider_InitFont_DEBUG(){return spider_InitFont_DEBUG()}function spider_FreeFont_DEBUG(a){-1!==a&&spider_font_CheckObject(a);return spider_FreeFont(a)}function spider_LoadFont_DEBUG(a,b,c,d){spider_font_CheckId(a);return spider_LoadFont(a,b,c,d)} function spider_FontID_DEBUG(a){spider_font_CheckObject(a);return spider_FontID(a)}function spider_IsFont_DEBUG(a){return spider_IsFont(a)}; function spider_BindEvent_DEBUG(a,b,c,d,e){return spider_BindEvent(a,b,c,d,e)}function spider_UnbindEvent_DEBUG(a,b,c,d,e){return spider_UnbindEvent(a,b,c,d,e)}function spider_PostEvent_DEBUG(a,b,c,d,e,f){return spider_PostEvent(a,b,c,d,e,f)}function spider_Event_DEBUG(){return spider_Event()}function spider_EventWindow_DEBUG(){return spider_EventWindow()}function spider_EventMenu_DEBUG(){return spider_EventMenu()}function spider_EventGadget_DEBUG(){return spider_EventGadget()} function spider_EventTimer_DEBUG(){return spider_EventTimer()}function spider_EventWebSocket_DEBUG(){return spider_EventWebSocket()}function spider_EventMobile_DEBUG(){return spider_EventMobile()}function spider_EventType_DEBUG(){return spider_EventType()}function spider_EventData_DEBUG(){return spider_EventData()}function spider_EventString_DEBUG(){return spider_EventString()}function spider_EventNotification_DEBUG(){return spider_EventNotification()}; function spider_InitMap_DEBUG(){return spider_InitMap()}function spider_AddMapElement_DEBUG(a,b){return spider_AddMapElement(a,b)}function spider_GetMapElement_DEBUG(a,b){return spider_GetMapElement(a,b)}function spider_ResetMap_DEBUG(a){return spider_ResetMap(a)}function spider_NextMapElement_DEBUG(a){return spider_NextMapElement(a)}function spider_MapKey_DEBUG(a){return spider_MapKey(a)}function spider_MapSize_DEBUG(a){return spider_MapSize(a)} function spider_DeleteMapElement_DEBUG(a,b){return spider_DeleteMapElement(a,b)}function spider_FindMapElement_DEBUG(a,b){return spider_FindMapElement(a,b)}function spider_CopyMap_DEBUG(a,b,c,d){return spider_CopyMap(a,b,c,d)}function spider_ClearMap_DEBUG(a){return spider_ClearMap(a)}function spider_FreeMap_DEBUG(a){return spider_FreeMap(a)}function spider_PushMapPosition_DEBUG(a){return spider_PushMapPosition(a)}function spider_PopMapPosition_DEBUG(a){return spider_PopMapPosition(a)}; function spider_PeekB_DEBUG(a,b){return spider_PeekB(a,b)}function spider_PeekA_DEBUG(a,b){return spider_PeekA(a,b)}function spider_PeekW_DEBUG(a,b){return spider_PeekW(a,b)}function spider_PeekU_DEBUG(a,b){return spider_PeekU(a,b)}function spider_PeekC_DEBUG(a,b){return spider_PeekC(a,b)}function spider_PeekL_DEBUG(a,b){return spider_PeekL(a,b)}function spider_PeekF_DEBUG(a,b){return spider_PeekF(a,b)}function spider_PeekD_DEBUG(a,b){return spider_PeekD(a,b)} function spider_PeekS_DEBUG(a,b,c,d){return spider_PeekS(a,b,c,d)}function spider_PokeB_DEBUG(a,b,c){return spider_PokeB(a,b,c)}function spider_PokeA_DEBUG(a,b,c){return spider_PokeA(a,b,c)}function spider_PokeW_DEBUG(a,b,c){return spider_PokeW(a,b,c)}function spider_PokeU_DEBUG(a,b,c){return spider_PokeU(a,b,c)}function spider_PokeC_DEBUG(a,b,c){return spider_PokeC(a,b,c)}function spider_PokeL_DEBUG(a,b,c){return spider_PokeL(a,b,c)}function spider_PokeF_DEBUG(a,b,c){return spider_PokeF(a,b,c)} function spider_PokeD_DEBUG(a,b,c){return spider_PokeD(a,b,c)}function spider_PokeS_DEBUG(a,b,c,d,e){return spider_PokeS(a,b,c,d,e)}function spider_AllocateMemory_DEBUG(a,b){return spider_AllocateMemory(a,b)}function spider_ReAllocateMemory_DEBUG(a,b,c){return spider_ReAllocateMemory(a,b,c)}function spider_FreeMemory_DEBUG(a){return spider_FreeMemory(a)}function spider_CompareMemory_DEBUG(a,b,c,d,e){return spider_CompareMemory(a,b,c,d,e)} function spider_MemorySize_DEBUG(a){return spider_MemorySize(a)}function spider_AllocateStructure_DEBUG(a,b){return spider_AllocateStructure(a,b)}function spider_FreeStructure_DEBUG(a){return spider_FreeStructure(a)}function spider_ClearStructure_DEBUG(a,b){return spider_ClearStructure(a,b)}function spider_CopyStructure_DEBUG(a,b,c){return spider_CopyStructure(a,b,c)}; var sb_datapointer=0; datamodel$l_mimedata=0; var _S24=""; var _S53=""; var _S52=""; var _S35="\n"; var _S21="Edit"; var _S71="Error - A file with this name already exists."; var _S63="Error - Failed to update article."; var _S44="-"; var _S45="."; var _S47="/"; var _S41="Default Name:"; var _S20="New Article"; var _S17="Title"; var _S60="gettag="; var _S16="Tags"; var _S25="Date:"; var _S36="Upload File"; var _S69="\\"; var _S13="Articles"; var _S46="_"; var _S15="Files"; var _S64="AC:"; var _S58="http://192.168.56.101/"; var _S79="PA:"; var _S86="%yy-%mm-%dd"; var _S28="Image:"; var _S40="Edit Tag"; var _S62="updatetag="; var _S73="&filedata="; var _S2="listfiles"; var _S1="http://192.168.56.101/admin/"; var _S61="[Error] A tag with the same name already exists."; var _S6="[Error] Failed to load data for stage: "; var _S67="Error - Failed to create new article."; var _S33="Name"; var _S9="LL:"; var _S39="New Tag"; var _S87="END"; var _S37="Delete File"; var _S72="newfile="; var _S66="NA:"; var _S50="deletearticle="; var _S14="●"; var _S5="listarticles"; var _S29="Blurb:"; var _S12="Tahoma"; var _S51="[Error] An article with the same name already exists."; var _S4="listlanguages"; var _S30="Content:"; var _S78="http://192.168.56.101/preview?UUID="; var _S84="Error - Failed to update tag."; var _S23="Title:"; var _S11="SelfHost Admin"; var _S80="NT:"; var _S49="getarticle="; var _S38="Color"; var _S34="Type"; var _S8="LA:"; var _S57="deletefile="; var _S42="Color:"; var _S56="*.*"; var _S75="NF:"; var _S65="Error - Failed to load article."; var _S48="newarticle"; var _S68="Error - Failed to delete article."; var _S26="Draft"; var _S27="Localized title:"; var _S74="Error - Failed to upload file."; var _S82="TC:"; var _S32="Save"; var _S77="Error - Failed to generate preview."; var _S31="Preview"; var _S10="LT:"; var _S55="previewarticle="; var _S70="FilePath"; var _S76="Error - Failed to delete file."; var _S22="Delete"; var _S19="Date"; var _S3="listtags"; var _S85="Published"; var _S83="Error - Failed to load tag."; var _S43="Localized name:"; var _S7="LF:"; var _S81="Error - Failed to create new tag."; var _S54="updatearticle="; var _S18="Status"; var _S59="newtag"; function s_string() { this._s=""; this.copy = function(dest) { var k; dest._s=this._s; }; } function mainwindow$uistate() { this._Window=0; this._CurrentSelection=0; this._CurrentArticleID=0; this._CurrentTagID=0; this._UploadBase64=""; this.copy = function(dest) { var k; dest._Window=this._Window; dest._CurrentSelection=this._CurrentSelection; dest._CurrentArticleID=this._CurrentArticleID; dest._CurrentTagID=this._CurrentTagID; dest._UploadBase64=this._UploadBase64; }; } function mainwindow$taglanguagegadgets() { this._Name=0; this.copy = function(dest) { var k; dest._Name=this._Name; }; } function mainwindow$tageditorgadgets() { this._Container=0; this._StringName=0; this._StringColor=0; this._Panel=0; this._ButtonSave=0; this._LanguageTabs=spider_NewList(mainwindow$taglanguagegadgets,"object",false); this.copy = function(dest) { var k; dest._Container=this._Container; dest._StringName=this._StringName; dest._StringColor=this._StringColor; dest._Panel=this._Panel; dest._ButtonSave=this._ButtonSave; spider_CopyList(this._LanguageTabs, dest._LanguageTabs); }; } function mainwindow$articlelanguagegadgets() { this._Name=0; this._Image=0; this._Blurb=0; this._Content=0; this.copy = function(dest) { var k; dest._Name=this._Name; dest._Image=this._Image; dest._Blurb=this._Blurb; dest._Content=this._Content; }; } function mainwindow$articleeditorgadgets() { this._Container=0; this._StringTitle=0; this._CheckboxDraft=0; this._Date=0; this._Panel=0; this._ButtonSave=0; this._ButtonPreview=0; this._ListviewTags=0; this._LanguageTabs=spider_NewList(mainwindow$articlelanguagegadgets,"object",false); this.copy = function(dest) { var k; dest._Container=this._Container; dest._StringTitle=this._StringTitle; dest._CheckboxDraft=this._CheckboxDraft; dest._Date=this._Date; dest._Panel=this._Panel; dest._ButtonSave=this._ButtonSave; dest._ButtonPreview=this._ButtonPreview; dest._ListviewTags=this._ListviewTags; spider_CopyList(this._LanguageTabs, dest._LanguageTabs); }; } function mainwindow$articlelistgadgets() { this._Container=0; this._ListIcon=0; this._ButtonNew=0; this._ButtonEdit=0; this._ButtonDelete=0; this.copy = function(dest) { var k; dest._Container=this._Container; dest._ListIcon=this._ListIcon; dest._ButtonNew=this._ButtonNew; dest._ButtonEdit=this._ButtonEdit; dest._ButtonDelete=this._ButtonDelete; }; } function mainwindow$menubargadgets() { this._Container=0; this._Font=0; this._Articles=0; this._Files=0; this._Tags=0; this._Separator0=0; this._Separator1=0; this.copy = function(dest) { var k; dest._Container=this._Container; dest._Font=this._Font; dest._Articles=this._Articles; dest._Files=this._Files; dest._Tags=this._Tags; dest._Separator0=this._Separator0; dest._Separator1=this._Separator1; }; } function mainwindow$tagslistgadgets() { this._Container=0; this._ListIcon=0; this._ButtonNew=0; this._ButtonEdit=0; this.copy = function(dest) { var k; dest._Container=this._Container; dest._ListIcon=this._ListIcon; dest._ButtonNew=this._ButtonNew; dest._ButtonEdit=this._ButtonEdit; }; } function mainwindow$filesgadgets() { this._Container=0; this._ListIcon=0; this._ButtonNew=0; this._ButtonDelete=0; this.copy = function(dest) { var k; dest._Container=this._Container; dest._ListIcon=this._ListIcon; dest._ButtonNew=this._ButtonNew; dest._ButtonDelete=this._ButtonDelete; }; } function datamodel$article() { this._Title=""; this._ID=0; this._Date=0; this._Draft=0; this._Tags=0; this.copy = function(dest) { var k; dest._Title=this._Title; dest._ID=this._ID; dest._Date=this._Date; dest._Draft=this._Draft; dest._Tags=this._Tags; }; } function datamodel$tag() { this._ID=0; this._BinaryID=0; this._DefaultName=""; this._Color=""; this.copy = function(dest) { var k; dest._ID=this._ID; dest._BinaryID=this._BinaryID; dest._DefaultName=this._DefaultName; dest._Color=this._Color; }; } function datamodel$file() { this._ID=0; this._Name=""; this._Type=""; this._Size=0; this.copy = function(dest) { var k; dest._ID=this._ID; dest._Name=this._Name; dest._Type=this._Type; dest._Size=this._Size; }; } var datamodel$t_Language; var datamodel$t_Tags; var datamodel$t_Files; var datamodel$t_Articles; var datamodel$m_MIMETypes={}; var general$g_loadingprogress=0; var mainwindow$g_articlelist=new mainwindow$articlelistgadgets(); var mainwindow$g_tageditor=new mainwindow$tageditorgadgets(); var mainwindow$g_filesview=new mainwindow$filesgadgets(); var mainwindow$g_menubar=new mainwindow$menubargadgets(); var mainwindow$g_state=new mainwindow$uistate(); var mainwindow$g_articleeditor=new mainwindow$articleeditorgadgets(); var mainwindow$g_tagslist=new mainwindow$tagslistgadgets(); if("undefined"==typeof Spider)var Spider={};spider.systembase={localFiles:null,getLocalFile:function(a){for(var b=0;bc?(a[b]=c,1):2048>c?(a[b]=192|c>>6,a[b+1]=128|c&63,2):55296>c||57344<=c?(a[b]=224|c>>12,a[b+1]=128|c>>6&63,a[b+2]=128|c&63,3):0} function spider_Memory_WriteCharacter(a,b,c,d){switch(d){case 24:return a[b]=c,1;case 25:return a[b]=c,a[b+1]=c>>8,2;default:return spider_Memory_WriteUTF8Character(a,b,c)}}function spider_PokeS(a,b,c,d,e){"undefined"===typeof e&&(e=2);"undefined"===typeof d&&(d=-1);var f=c.length;if(-1==d||d>f)d=f;var f=b,g=e&31;0===g&&(g=25);for(var h=0;ha?-1:1:0}function spider_Sin(a){return Math.sin(a)}function spider_SinH(a){return(Math.exp(a)-Math.exp(-a))/2} function spider_Tan(a){return Math.tan(a)}function spider_TanH(a){return(Math.exp(a)-Math.exp(-a))/(Math.exp(a)+Math.exp(-a))}function spider_Pow(a,b){return Math.pow(a,b)}function spider_Int(a){return a|0}function spider_IntQ(a){return 0<=a?Math.floor(a):Math.ceil(a)}function spider_IsNAN(a){return isNaN(a)?1:0}function spider_Random(a,b){"undefined"===typeof b&&(b=0);return b+Math.floor(Math.random()*(a-b+1))}function spider_RandomSeed(a){Math.seedrandom(a)}; if("undefined"==typeof Spider)var Spider={};function spider_Asc(a){return""===a?0:a.charCodeAt(0)}function spider_Bin(a,b){"undefined"===typeof b&&(b=13);switch(b){case 1:case 24:a&=255;break;case 3:case 25:a&=65535;break;case 5:return spider_Right(a.toString(2),32);case 13:if(!(0<=a))return(-a-1).toString(2).replace(/[01]/g,function(a){return+!+a}).padStart(64,"1")}return a.toString(2)}function spider_Chr(a){return String.fromCharCode(a)}function spider_LCase(a){return a.toLowerCase()} function spider_UCase(a){return a.toUpperCase()}function spider_CountString(a,b){if(0>=b.length)return a.length+1;for(var c=0,d=0,e=b.length;;)if(d=a.indexOf(b,d),0<=d)c++,d+=e;else break;return c}function spider_FindString(a,b,c,d){"undefined"===typeof c&&(c=1);"undefined"===typeof d&&(d=0);return a&&b&&""!==a&&""!==b?0===d?a.indexOf(b,c-1)+1:a.toUpperCase().indexOf(b.toUpperCase(),c-1)+1:0} function spider_FormatNumber(a,b,c,d){"undefined"===typeof b&&(b=2);"undefined"===typeof c&&(c=".");"undefined"===typeof d&&(d=",");if(0<=b){var e=b;a=Number(Math.round(Number(a+"e"+e))+"e"+-1*e)}for(var e=Math.abs(a).toString(),g=e.includes(".")?e.split(".")[0]:e,f="",k=1,h=g.length-1;0<=h;h--)f=g[h]+f,0===k%3&&0!==k&&0!==h&&(f=d+f),k++;0a?"-"+f:f} function spider_InsertString(a,b,c){1>c?c=1:c>a.length+1&&(c=a.length+1);return a.substr(0,c-1)+b+a.substr(c-1)}function spider_Space(a){if(0>=a)return"";for(var b=a/2,c=" ";c.length<=b;)c+=c;return c+c.substring(0,a-c.length)}function spider_Str(a){return""+a}function spider_StrD(a,b){var c;c="undefined"===typeof b?a.toString():a.toFixed(b);"Infinity"==c&&(c="+Infinity");return c}function spider_StrF(a,b){return spider_StrD(a,b)} function spider_StrU(a,b){"undefined"===typeof b&&(b=13);switch(b){case 1:case 24:a&=255;break;case 3:case 25:a&=65535}return a.toString(10)}function spider_Val(a){for(var b=0,c=a.length-1,d=0;d<=c&&(" "==a.charAt(d)||"t"==a.charAt(d));)d++;c=a.charAt(d);"-"==c&&(d++,b=1,c=a.charAt(d));a="%"==c?parseInt(spider_Right(a,a.length-d-1),2):"$"==c?parseInt(spider_Right(a,a.length-d-1),16):parseInt(spider_Right(a,a.length-d),10);isNaN(a)&&(a=0);return b?-a:a} function spider_ValF(a){a=parseFloat(a,10);isNaN(a)&&(a=0);return a}function spider_ValD(a){a=parseFloat(a,10);isNaN(a)&&(a=0);return a}function spider_Right(a,b){var c=a.length;return a.substring(c-b,c)}function spider_Left(a,b){return a.substring(0,b)}function spider_Mid(a,b,c){"undefined"===typeof c&&(c=a.length);1>b&&(b=1);return a.substring(b-1,b+c-1)}function spider_LTrim(a,b){"undefined"===typeof b&&(b=" ");for(var c=0,d=a.length-1;c<=d&&a.charAt(c)==b;)c++;return a.substr(c)} function spider_RTrim(a,b){"undefined"===typeof b&&(b=" ");for(var c=a.length-1;0c&&a.charAt(d)==b;)d--;return a.substr(c,d-c+1)}function spider_Len(a){return a.length} function spider_Hex(a,b){"undefined"===typeof b&&(b=13);switch(b){case 1:case 24:a&=255;break;case 3:case 25:a&=65535;break;case 5:a&=4294967295}return a.toString(16).toUpperCase()}function spider_ReplaceString(a,b,c,d,e,g){"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e=1);"undefined"===typeof g&&(g=-1);if(a&&b)for(e-=1,1==d&&(b=b.toUpperCase());g;){e=1==d?a.toUpperCase().indexOf(b,e):a.indexOf(b,e);if(-1==e)break;a=a.substring(0,e)+c+a.substring(e+b.length);e+=c.length;g--}return a} function spider_RemoveString(a,b,c,d,e){return spider_ReplaceString(a,b,"",c,d,e)}function spider_ReverseString(a){var b="",c;for(c=a.length-1;0<=c;c--)b+=a.charAt(c);return b}function spider_RSet(a,b,c){"undefined"===typeof c&&(c=" ");var d=b-a.length;if(a.length>b)return a.substring(0,b);if(0b)return a.substring(0,b);if(0=b)?a[b-1]:""}function spider_StringByteLength(a){return 0n[u+3]&&(h=h*n[u+3]/250);B+=h*n[u];C+=h*n[u+1];D+=h*n[u+2];v+=h}s[w]=B/v;s[w+1]=C/v;s[w+2]=D/v;s[w+3]=E/A}!0===e?(a.width=b,a.height=c):r.clearRect(0,0,d,f);r.putImageData(t,0,0)}}; function spider_LoadImage(a,b,c){"undefined"===typeof c&&(c=0);var e=spider.image.objects.Allocate(a),d=document.createElement("canvas");e.image=d;spider.image.div.appendChild(d);var f=new Image;$(f).on({load:function(){d.width=f.width;d.height=f.height;d.getContext("2d").drawImage(f,0,0);var a=spider_GetExtensionPart(b).toLowerCase();"jpg"==a||"jpeg"==a?e.originalFormat=1195724874:"png"==a?e.originalFormat=4673104:"bmp"==a&&(e.originalFormat=5262658);spider.event.SendLoading(18,1,b,e.id)},error:function(){spider.event.SendLoading(19, 1,b,e.id)}});c&65536?(a=spider.systembase.getLocalFile(b))?(c=new FileReader,$(c).on({load:function(a){f.src=a.target.result},error:function(){spider.event.SendLoading(19,1,b,e.id)}}),c.readAsDataURL(a)):spider.event.SendLoading(19,1,b,e.id):f.src=c&2?"data:image/jpeg;base64,"+b:c&1?"data:image/png;base64,"+b:b;return e.resultId} function spider_CopyImage(a,b){var c,e=spider.image.objects.Allocate(b);if(c=spider.image.objects.Get(a)){var d=document.createElement("canvas");d.width=c.image.width;d.height=c.image.height;e.image=d;spider.image.div.appendChild(d);d.getContext("2d").drawImage(c.image,0,0)}return e.resultId} function spider_CreateImage(a,b,c,e,d){"undefined"===typeof d&&(d=0);a=spider.image.objects.Allocate(a);e=document.createElement("canvas");e.width=b;e.height=c;a.image=e;spider.image.div.appendChild(e);-1!=d&&(e=e.getContext("2d"),e.fillStyle=spider_helper_ColorToHtml(d),e.fillRect(0,0,b,c));return a.resultId} function spider_GrabImage(a,b,c,e,d,f){b=spider.image.objects.Allocate(b);if(a=spider.image.objects.Get(a)){var g=document.createElement("canvas");g.width=d;g.height=f;b.image=g;spider.image.div.appendChild(g);g.getContext("2d").drawImage(a.image,c,e,d,f,0,0,d,f)}return b.resultId}function spider_ImageOutput(a){return(a=spider.image.objects.Get(a))?(a.image.css=!1,a.image.grayedCss=!1,{image:a,canvas:a.image,context:a.image.getContext("2d"),stopDrawingCallback:null}):0} function spider_ImageVectorOutput(a,b){"undefined"===typeof b&&(b=1);var c;return(c=spider.image.objects.Get(a))?(c.image.css=!1,c.image.grayedCss=!1,{image:c,canvas:c.image,inputUnit:1,outputUnit:b,stopDrawingCallback:null}):0}function spider_EncodeImage(a,b,c){"undefined"===typeof b&&(b=4673104);"undefined"===typeof c&&(c=7);var e;return(e=spider.image.objects.Get(a))?1195724874==b?e.image.toDataURL("image/jpeg",c/10):e.image.toDataURL("image/png"):""} function spider_ExportImage(a,b,c){"undefined"===typeof c&&(c=4673104);return(a=spider.image.objects.Get(a))?(a.image.toBlob(function(a){saveAs(a,b)},1195724874==c?"image/jpeg":"image/png"),1):0}function spider_ImageDepth(a){return spider.image.objects.Get(a)?32:0}function spider_ImageFormat(a){var b;return(b=spider.image.objects.Get(a))?b.originalFormat?b.originalFormat:0:0}function spider_ImageWidth(a){var b;return(b=spider.image.objects.Get(a))?b.image.width:0} function spider_ImageHeight(a){var b;return(b=spider.image.objects.Get(a))?b.image.height:0} function spider_ResizeImage(a,b,c,e){"undefined"===typeof e&&(e=0);if(a=spider.image.objects.Get(a)){var d=document.createElement("canvas");-65535==b&&(b=a.image.width);-65535==c&&(c=a.image.height);d.width=b;d.height=c;a.image.css=!1;a.image.grayedCss=!1;var f=d.getContext("2d");if(1==e)if(f.webkitImageSmoothingEnabled||f.mozImageSmoothingEnabled||f.imageSmoothingEnabled)f.webkitImageSmoothingEnabled=!1,f.mozImageSmoothingEnabled=!1,f.imageSmoothingEnabled=!1,f.drawImage(a.image,0,0,a.image.width, a.image.height,0,0,b,c);else{var g=a.image.getContext("2d");e=a.image.width;for(var l=a.image.height,p=g.getImageData(0,0,e,l),g=f.createImageData(b,c),p=p.data,m=g.data,r=e/b,l=l/c,n=0;n>24&255;return 0===b?"rgb("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+")":"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+b/255+")"} function spider_2ddrawing_getTextHeight(a){a=$("Hg").css("font",a);var b=$('
'),d=$("
");d.append(a,b);$("body").append(d);var f={};try{b.css({verticalAlign:"baseline"}),f.ascent=Math.ceil(b.offset().top-a.offset().top),b.css({verticalAlign:"bottom"}),f.height=Math.ceil(b.offset().top-a.offset().top),f.descent=Math.ceil(f.height-f.ascent)}finally{d.remove()}return f} function spider_StartDrawing(a){spider.drawing.output=a;spider.drawing.context=a.context;spider.drawing.stopDrawingCallback=a.stopDrawingCallback;spider.drawing.frontColor=0;spider.drawing.backColor=16777215;spider.drawing.mode=0;spider.drawing.context.lineWidth=1;spider.drawing.context.font="12pt arial";return a.context} function spider_Box(a,b,d,f,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);var e=spider.drawing.context;4==spider.drawing.mode?(e.beginPath(),e.strokeStyle=spider_helper_ColorToHtml(c),e.strokeRect(a,b,d,f)):(e.fillStyle=spider_helper_ColorToHtml(c),e.fillRect(a,b,d,f))}function spider_DrawAlphaImage(a,b,d,f){"undefined"===typeof f&&(f=255);var c=spider.drawing.context,e=c.globalAlpha;c.globalAlpha=f/255;c.drawImage(a,b,d);c.globalAlpha=e} function spider_DrawImage(a,b,d,f,c){var e=spider.drawing.context;"undefined"===typeof f?e.drawImage(a,b,d):e.drawImage(a,0,0,a.width,a.height,b,d,f,c)}function spider_Plot(a,b,d){"undefined"===typeof d&&(d=spider.drawing.frontColor);var f=spider.drawing.context;f.fillStyle=spider_helper_ColorToHtml(d);f.fillRect(a,b,1,1)}function spider_Point(a,b){var d=spider.drawing.context.getImageData(a,b,1,1).data;return d[0]|d[1]<<8|d[2]<<16|d[3]<<24}function spider_OutputDepth(){return 32} function spider_OutputWidth(){return spider.drawing.context.canvas.width}function spider_OutputHeight(){return spider.drawing.context.canvas.height}function spider_Line(a,b,d,f,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);var e=spider.drawing.context;e.beginPath();e.moveTo(a+0.5,b+0.5);e.lineTo(a+0.5+d-1,b+f-1+0.5);e.strokeStyle=spider_helper_ColorToHtml(c);e.stroke()} function spider_LineXY(a,b,d,f,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);var e=spider.drawing.context;e.beginPath();e.moveTo(a+0.5,b+0.5);e.lineTo(d+0.5,f+0.5);e.strokeStyle=spider_helper_ColorToHtml(c);e.stroke()} function spider_DrawText(a,b,d,f,c){"undefined"===typeof f&&(f=spider.drawing.frontColor);"undefined"===typeof c&&(c=spider.drawing.backColor);var e=spider.drawing.context,g=Math.ceil(e.measureText(d).width);if(!(spider.drawing.mode&1)){var h=spider_TextHeight(d);e.fillStyle=spider_helper_ColorToHtml(c);e.fillRect(a,b,g,h)}e.fillStyle=spider_helper_ColorToHtml(f);e.fillText(d,a,b+spider_2ddrawing_getTextHeight(spider.drawing.context.font).ascent);return a+g} function spider_Circle(a,b,d,f){"undefined"===typeof f&&(f=spider.drawing.frontColor);var c=spider.drawing.context;4==spider.drawing.mode?(c.beginPath(),c.arc(a,b,d-1,0,2*Math.PI,!1),c.strokeStyle=spider_helper_ColorToHtml(f),c.stroke()):(c.beginPath(),c.arc(a,b,d,0,2*Math.PI,!1),c.fillStyle=spider_helper_ColorToHtml(f),c.fill())} function spider_Ellipse(a,b,d,f,c){function e(a,d,f,b,c){var e=b/2*0.5522848,k=c/2*0.5522848,g=d+b,l=f+c;b=d+b/2;c=f+c/2;a.beginPath();a.moveTo(d,c);a.bezierCurveTo(d,c-k,b-e,f,b,f);a.bezierCurveTo(b+e,f,g,c-k,g,c);a.bezierCurveTo(g,c+k,b+e,l,b,l);a.bezierCurveTo(b-e,l,d,c+k,d,c);a.closePath()}"undefined"===typeof c&&(c=spider.drawing.frontColor);var g=spider.drawing.context;4==spider.drawing.mode?(e(g,a-d,b-f,2*d,2*f),g.strokeStyle=spider_helper_ColorToHtml(c),g.stroke()):(e(g,a-d,b-f,2*d,2*f),g.fillStyle= spider_helper_ColorToHtml(c),g.fill())}function spider_DrawingFont(a){spider.drawing.context.font=a.name}function spider_DrawingMode(a){spider.drawing.mode=a}function spider_StopDrawing(){spider.drawing.stopDrawingCallback&&spider.drawing.stopDrawingCallback(spider.drawing.output);spider.drawing.output=null} function spider_RoundBox(a,b,d,f,c,e,g){function h(a,b,c,d,f,e){"undefined"===typeof e&&(e=5);a.beginPath();a.moveTo(b+e,c);a.lineTo(b+d-e,c);a.quadraticCurveTo(b+d,c,b+d,c+e);a.lineTo(b+d,c+f-e);a.quadraticCurveTo(b+d,c+f,b+d-e,c+f);a.lineTo(b+e,c+f);a.quadraticCurveTo(b,c+f,b,c+f-e);a.lineTo(b,c+e);a.quadraticCurveTo(b,c,b+e,c);a.closePath()}e=spider.drawing.context;4==spider.drawing.mode?(h(e,a+0.5,b+0.5,d,f,c),e.strokeStyle=spider_helper_ColorToHtml(g),e.stroke()):(h(e,a+0.5,b+0.5,d,f,c),e.fillStyle= spider_helper_ColorToHtml(g),e.fill())}function spider_RGB(a,b,d){return d<<16|b<<8|a}function spider_RGBA(a,b,d,f){return(f<<24|d<<16|b<<8|a)>>>0}function spider_Red(a){return a&255}function spider_Green(a){return a>>8&255}function spider_Blue(a){return a>>16&255}function spider_Alpha(a){return a>>24&255}function spider_BackColor(a){return spider.drawing.backColor=a}function spider_FrontColor(a){return spider.drawing.frontColor=a} function spider_TextHeight(a){a=spider_2ddrawing_getTextHeight(spider.drawing.context.font);return a.ascent+a.descent}function spider_TextWidth(a){return Math.ceil(spider.drawing.context.measureText(a).width)}; (function(){function B(b){var a;if(-1==b)spider.window.objects.CleanAll();else if(a=spider.window.objects.Get(b)){for(var c in a.timers)clearInterval(a.timers[c]);spider.gadget.freeWindowGadgets(b);a.id==spider.window.activeWindow&&(spider.window.activeWindow=-1);null!==a.parentId?s(a.parentId):-1!==a.previousActiveWindowId&&s(a.previousActiveWindowId);a.closeScreen&&a.closeScreen();a.window.parentNode.removeChild(a.window);spider.window.objects.Remove(b)}}function C(b){var a="";b&131072&&(a+="ctrl+"); b&65536&&(a+="shift+");b&262144&&(a+="alt+");b&524288&&(a+="mod+");switch(b){case 8:a+="backspace";break;case 9:a+="tab";break;case 13:a+="enter";break;case 0:a+="capslock";break;case 27:a+="escape";break;case 32:a+="space";break;case 33:a+="pageup";break;case 34:a+="pagedown";break;case 4:a+="end";break;case 1:a+="home";break;case 37:a+="left";break;case 38:a+="up";break;case 39:a+="right";break;case 40:a+="down";break;case 5:a+="ins";break;case 127:a+="del";break;case 43:a+="plus";break;default:a= 201<=b&&212>=b?a+("f"+(b-201+1)):a+spider_Chr(b&-983041)}return a}function k(b){w()==b.id&&(Mousetrap.reset(),b=Object.keys(b.shortcuts),Mousetrap.bindGlobal(b,D))}function D(b,a){var c,e=w();if(-1!=e&&(c=spider.window.objects.Get(e)))return spider.event.Send(2,c.id,c.shortcuts[a]),!1}function w(){return spider.window.activeWindow}function s(b){if(b=spider.window.objects.Get(b))b.flags&4096?(spider.window.activeWindow=b.id,k(b)):b.element.style.zIndex!=spider.window.globalZIndex&&(b.sticky?(b.element.style.zIndex= spider.window.globalStickyZIndex,spider.window.globalStickyZIndex++):(b.element.style.zIndex=spider.window.globalZIndex,spider.window.globalZIndex++),spider.window.activeWindow=b.id,k(b))}function p(b){return b.flags&4608?0:$(b.contentFrame).cssValue("marginRight")+$(b.contentFrame).cssValue("marginLeft")+$(b.contentFrame).cssValue("borderRightWidth")+$(b.contentFrame).cssValue("borderLeftWidth")}function m(b){return b.flags&4608?0:$(b.contentFrame).cssValue("marginTop")+$(b.contentFrame).cssValue("marginBottom")+ $(b.contentFrame).cssValue("borderTopWidth")+$(b.contentFrame).cssValue("borderBottomWidth")}function x(b,a,c,e,t){if(b=spider.window.objects.Get(b))-65535!=a&&(b.element.style.left=a+"px"),-65535!=c&&(b.element.style.top=c+"px"),-65535!=e&&$(b.element).width(e+p(b)),-65535!=t&&$(b.element).height(t+m(b)),-65535==e&&-65535==t||b.AdjustContent()}function E(b,a){var c,e;if(e=spider.window.objects.Get(b))a&1?(c=spider_DesktopWidth(0)/2-y(b,0)/2,e=spider_DesktopHeight(0)/2-z(b,0)/2,x(b,c,e,-65535,-65535)): a&2&&null!==e.parentId&&(c=F(e.parentId)+(y(e.parentId,0)-y(b,0))/2,e=G(e.parentId)+(z(e.parentId,0)-z(b,0))/2,x(b,c,e,-65535,-65535))}function F(b){var a;return(a=spider.window.objects.Get(b))?a.element.getBoundingClientRect().left|0:0}function G(b){var a;return(a=spider.window.objects.Get(b))?a.element.getBoundingClientRect().top|0:0}function y(b,a){"undefined"===typeof a&&(a=1);var c;return(c=spider.window.objects.Get(b))?c.flags&4608?$(c.element).width():1==a?$(c.element).width()-p(c):$(c.element).width()+ 2:0}function z(b,a){"undefined"===typeof a&&(a=1);var c;return(c=spider.window.objects.Get(b))?c.flags&4608?$(c.element).height()-$(c.content).cssValue("top"):1==a?$(c.element).height()-m(c):$(c.element).height()-m(c)+$(c.title).height()+9:0}var A;spider.nbModules++;require(["interact.min","mousetrap.min"],function(b){A=b;require(["mousetrap-global-bind.min"],function(){spider.nbLoadedModules++;SpiderMain()})});spider.window={objects:new spider.object(B),activeWindow:-1,globalZIndex:100,globalStickyZIndex:500, currentWindowId:-1,gadgetList:null};spider.window.GadgetList=function(){return{panel:null,stackIndex:0,stack:{},get:function(){return this.panel},set:function(b){this.panel=b},push:function(b,a){this.stack[this.stackIndex]={panel:this.panel,windowId:spider.window.currentWindowId};this.stackIndex++;this.panel=b;spider.window.currentWindowId=a},pop:function(){this.stackIndex--;this.panel=this.stack[this.stackIndex].panel;spider.window.currentWindowId=this.stack[this.stackIndex].windowId}}};spider.window.gadgetList= new spider.window.GadgetList;window.spider_InitWindow=function(){};window.spider_CloseWindow=B;window.spider_DisableWindow=function(b,a){var c;if(c=spider.window.objects.Get(b))a?c.disabled||($(c.window).find("*").prop("disabled",!0),$(c.contentFrame).block({message:null,overlayCSS:{opacity:0.2,cursor:"default"}}),c.disabled=1):c.disabled&&($(c.window).find("*").prop("disabled",!1),$(c.contentFrame).unblock(),c.disabled=0)};window.spider_OpenWindow=function(b,a,c,e,t,h,g,q){"undefined"===typeof g&& (g=16);"undefined"===typeof q&&(q=null);var d=spider.window.objects.Allocate(b);d.mouseX=-1;d.mouseY=-1;d.color=-1;d.userData=0;d.shortcuts=[];d.timers=[];d.parentId=q?q.id:null;d.previousActiveWindowId=w();b=document.getElementById("spiderbody");q=document.createElement("div");var f=document.createElement("div"),u=document.createElement("div"),m=document.createElement("div"),v;g&256&&(f.style.visibility="hidden");var r=" sbNoSelect";g&8192&&(r="");g&4096?(c=a=0,e=spider_DesktopWidth(0),t=spider_DesktopHeight(0), document.title=h,f.style.zIndex=80,f.className="spiderwindow-background"+r,g&=-49,$(window).resize(function(){x(d.id,0,0,spider_DesktopWidth(0),spider_DesktopHeight(0));spider.event.Send(7,d.id,0,0)})):g&512?(f.className="spiderwindow-background"+r,g&=-49):(f.className="spiderwindow"+r,m.innerHTML=h,m.className="spiderwindow-title",u.appendChild(m),g&16&&(v=document.createElement("div"),v.className="spiderwindow-closebutton",$(v).on("click touchend",function(){spider.event.Send(4,d.id,0,0)}),u.appendChild(v))); var n=document.createElement("div");n.className="spiderwindow-content";$(n).on({mouseover:function(a){var b=n.getBoundingClientRect();d.mouseX=a.clientX-b.left|0;d.mouseY=a.clientY-b.top|0},mouseout:function(a){d.mouseX=-1;d.mouseY=-1},mousemove:function(a){var b=n.getBoundingClientRect();d.mouseX=a.clientX-b.left|0;d.mouseY=a.clientY-b.top|0},click:function(){spider.event.Send(14,spider.window.activeWindow)},dblclick:function(){spider.event.Send(15,spider.window.activeWindow)},mouseup:function(a){3=== a.which&&spider.event.Send(13,spider.window.activeWindow)}});var k=document.createElement("div");k.className="spiderwindow-menubar";var p=document.createElement("div"),l=document.createElement("div"),r=document.createElement("div");d.window=q;d.element=f;d.contentFrame=n;d.content=l;d.menu=k;d.toolBar=p;d.statusBar=r;d.title=u;d.titleText=m;d.titleString=h;d.flags=g;s(d.id);q.appendChild(f);f.appendChild(u);f.appendChild(n);$(f).css("touch-action","none");$(u).css("touch-action","none");l.style.position= "absolute";l.style.top="0px";l.style.left="0px";$(l).css("overflow","hidden");$(l).css("width","100%");$(l).css("height","100%");l.window=d;n.appendChild(k);n.appendChild(p);n.appendChild(l);n.appendChild(r);f.style.position="absolute";b.appendChild(q);g&32&&($(f).resizable({handles:"n, e, s, w, ne, se, sw, nw",containment:"body",ghost:!1,resize:function(a,b){spider.event.Send(7,d.id,0,0)},start:function(){$(".sbWebGadget").each(function(a){$(this).css("pointer-events","none")})},stop:function(){$(".sbWebGadget").each(function(a){$(this).css("pointer-events", "auto")})}}),$(".ui-icon-gripsmall-diagonal-se").css("background-image","url('')"),g&16&&($(f).resizable("option","minWidth",80),$(f).resizable("option","minHeight",40)));g&20992||(A(u).draggable({listeners:{move:function(a){var b=f.getBoundingClientRect().left+a.dx;a=f.getBoundingClientRect().top+a.dy;f.style.left=b+"px";f.style.top=a+"px";spider.event.Send(6,d.id,0,0)}}}).styleCursor(!1),v&&A(v).draggable(!0).styleCursor(!1));$(f).on("mousedown",function(){spider.window.activeWindow!=d.id&&(-1!= spider.window.activeWindow&&spider.event.Send(16,spider.window.activeWindow,0,0),document.activeElement.blur(),spider.event.Send(8,d.id,0,0),s(d.id))});d.AdjustContent=function(){$(l).css("top",$(k).height()+$(p).height())};x(d.id,a,c,e,t);E(d.id,g);0===(g&1024)&&spider.window.gadgetList.set(l);spider.window.currentWindowId=d.id;return d.resultId};window.spider_AddKeyboardShortcut=function(b,a,c){var e;if(e=spider.window.objects.Get(b))if(a=C(a))e.shortcuts[a]=c,w()==b&&Mousetrap.bindGlobal(a,D)}; window.spider_RemoveKeyboardShortcut=function(b,a){var c;if(c=spider.window.objects.Get(b))if(-1==a)c.shortcuts=[],k(c);else if(a=C(a))delete c.shortcuts[a],k(c)};window.spider_AddWindowTimer=function(b,a,c){var e;if(e=spider.window.objects.Get(b))e.timers[""+a]=setInterval(function(){spider.event.Send(12,e.id,a,0)},c)};window.spider_RemoveWindowTimer=function(b,a){var c;if(c=spider.window.objects.Get(b)){var e=""+a;c.timers[e]&&(clearInterval(c.timers[e]),delete c.timers[e])}};window.spider_HideWindow= function(b,a,c){if(b=spider.window.objects.Get(b))b.element.style.visibility=0===a?"visible":"hidden"};window.spider_GetWindowTitle=function(b){var a;return(a=spider.window.objects.Get(b))?a.titleString:""};window.spider_SetWindowTitle=function(b,a){var c;if(c=spider.window.objects.Get(b))c.titleString=a,c.flags&4096?document.title=a:c.titleText&&(c.titleText.innerHTML=a)};window.spider_GetWindowData=function(b){var a;return(a=spider.window.objects.Get(b))?a.userData:0};window.spider_SetWindowData= function(b,a){var c;if(c=spider.window.objects.Get(b))c.userData=a};window.spider_GetActiveWindow=w;window.spider_SetActiveWindow=s;window.spider_GetWindowColor=function(b){var a;return(a=spider.window.objects.Get(b))?a.color:-1};window.spider_SetWindowColor=function(b,a){var c;if(c=spider.window.objects.Get(b))-1==a?c.color=-1:(c.color=a,$(c.content).css("background-color",spider_helper_ColorToHtml(a)))};window.spider_StickyWindow=function(b,a){var c;if(c=spider.window.objects.Get(b))c.sticky=a, s(c.id)};window.spider_ResizeWindow=x;window.spider_WindowBounds=function(b,a,c,e,k){var h;(h=spider.window.objects.Get(b))&&h.flags&32&&(-65535!=a&&$(h.element).resizable("option","minWidth",a+p(h)),-65535!=c&&$(h.element).resizable("option","minHeight",c+m(h)),-65535!=e&&$(h.element).resizable("option","maxWidth",e+p(h)),-65535!=k&&$(h.element).resizable("option","maxHeight",k+m(h)))};window.spider_WindowX=F;window.spider_WindowY=G;window.spider_WindowWidth=y;window.spider_WindowHeight=z;window.spider_WindowMouseX= function(b){var a;return(a=spider.window.objects.Get(b))?a.mouseX:0};window.spider_WindowMouseY=function(b){var a;return(a=spider.window.objects.Get(b))?a.mouseY:0};window.spider_WindowID=function(b){var a;return(a=spider.window.objects.Get(b))?a:null};window.spider_WindowOpacity=function(b,a){var c;if(c=spider.window.objects.Get(b))c.element.style.opacity=a/100};window.spider_IsWindow=function(b){return spider.window.objects.Is(b)};window.spider_window_Center=E})(); function spider_InitList(){}function spider_NewList(a,b,c){var d=new spider_SysList;d.current=0;d.first=0;d.last=0;d.type=a;d.field=b;d.isNative=c;return d} function spider_AddElement(a){var b=new a.type;a.nbElements++;if(a.current){b.previous=a.current;if(b.next=a.current.next)a.current.next.previous=b;a.current.next=b;a.current=b;a.index++}else a.first&&(a.first.previous=b),a.current=b,b.next=a.first,b.previous=0,a.index=0,a.isIndexInvalid=!1;a.current.previous||(a.first=a.current);a.current.next||(a.last=a.current);return b} function spider_InsertElement(a){var b=new a.type;a.nbElements++;if(a.current){b.next=a.current;if(b.previous=a.current.previous)a.current.previous.next=b;a.current.previous=b;a.current=b}else a.first&&(a.first.previous=b),a.current=b,a.current.next=a.first,a.current.previous=0,a.index=0,a.isIndexInvalid=!1;a.current.previous||(a.first=a.current);a.current.next||(a.last=a.current);return b} function spider_ListIndex(a){if(a.isIndexInvalid){var b=-1,c=a.current;if(c){for(;c;)b++,c=c.previous;a.index=b;a.isIndexInvalid=!1}return b}return a.index}function spider_LastElement(a){a.current=a.last;return a.current?(a.isIndexInvalid=!1,a.index=a.nbElements-1,a.current):0} function spider_MergeLists(a,b,c){"undefined"===typeof c&&(c=2);if(a.first){3!=c||b.current&&b.current!=b.first?4!=c||b.current&&b.current!=b.last||(c=2):c=1;if(b.first)switch(c){case 3:a.first.previous=b.current.previous;b.current.previous.next=a.first;b.current.previous=a.last;a.last.next=b.current;b.isIndexInvalid=!0;break;case 4:b.current.next.previous=a.last;a.last.next=b.current.next;a.first.previous=b.current;b.current.next=a.first;break;case 1:a.last.next=b.first;b.first.previous=a.last;b.first= a.first;b.isIndexInvalid=!0;break;default:a.first.previous=b.last,b.last.next=a.first,b.last=a.last}else b.first=a.first,b.last=a.last;b.nbElements+=a.nbElements;a.current=0;a.first=0;a.last=0;a.nbElements=0;a.isIndexInvalid=!0}} function spider_MoveElement(a,b,c){function d(a){a.current.previous&&(a.current.previous.next=a.current.next);a.current.next&&(a.current.next.previous=a.current.previous);a.current==a.first&&(a.first=a.current.next);a.current==a.last&&(a.last=a.current.previous)}var e;if(e=a.current)switch(b){case 1:e!=a.first&&(d(a),e.previous=0,e.next=a.first,a.first.previous=e,a.first=e,a.index=0,a.isIndexInvalid=0);break;case 2:e!=a.last&&(d(a),e.previous=a.last,e.next=0,a.last.next=e,a.last=e,a.index=a.nbElements- 1,a.isIndexInvalid=0);break;case 3:c&&e!=c&&(d(a),e.next=c,e.previous=c.previous,c.previous=e,e.previous&&(e.previous.next=e),c==a.first&&(a.first=e),a.isIndexInvalid=1);break;case 4:c&&e!=c&&(d(a),e.previous=c,e.next=c.next,c.next=e,e.next&&(e.next.previous=e),c==a.last&&(a.last=e),a.isIndexInvalid=1)}}function spider_NextElement(a){var b;if(a.current){if(b=a.current.next)a.current=b,a.index++}else b=a.first,a.current=b,a.index=0;return b?b:0} function spider_PushListPosition(a){a.stack||(a.stack=[]);a.stack.push(a.current)}function spider_PopListPosition(a){a.stack&&0b||b>=a.nbElements)c=0;else if(a.isIndexInvalid)if(bd)if(c=a.current,b-dh&&(f=h,e=h*m),k=Math.sqrt(c*c+d*d),f>k&&(f=k,e=k*m),g=a-g*f/h,l=b-l*f/h,c=a-c*f/k,d=b-d*f/k,m=a-g+(a-c),k=b-l+(b-d),h=Math.sqrt(m*m+k*k),f=Math.sqrt(f*f+e*e),a-=m*f/h,b-=k*f/h, f=Math.atan2(l-b,g-a),c=Math.atan2(d-b,c-a),spider_AddPathLine(g,l,0),spider_AddPathCircle(a,b,e,180/Math.PI*f,180/Math.PI*c,2,!0))} function spider_AddPathCircle(a,b,c,d,e,g,f){var k,l;"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e=359.9);"undefined"===typeof g&&(g=0);if(g&4){var h=e;e=d+360;d=h}var h=d*Math.PI/180,m=(e-d)*Math.PI/180;k=a+c*Math.cos(h);l=b+c*Math.sin(h);d=a+c*Math.cos(h+m/2);e=b+c*Math.sin(h+m/2);a+=c*Math.cos(h+m);b+=c*Math.sin(h+m);g&2?spider_AddPathLine(k,l,g):spider_MovePathCursor(k,l,g);g&1?spider.vectordrawing.path.arcBy(d,e,a,b):spider.vectordrawing.path.arcTo(d,e,a,b);f&&spider_MovePathCursor(a, b)}function spider_AddPathLine(a,b,c){"undefined"===typeof c&&(c=0);c&1?spider.vectordrawing.path.lineBy(new paper.Point(a,b)):spider.vectordrawing.path.lineTo(new paper.Point(a,b));spider.vectordrawing.isPathEmpty=0} function spider_AddPathBox(a,b,c,d,e){"undefined"===typeof e&&(e=0);e&2?(spider_AddPathLine(a,b,e),spider_AddPathLine(c,0,e|1),spider_AddPathLine(0,d,e|1),spider_AddPathLine(-c,0,e|1),spider_AddPathLine(0,-d,e|1)):(spider_MovePathCursor(a,b,e),spider_AddPathLine(c,0,e|1),spider_AddPathLine(0,d,e|1),spider_AddPathLine(-c,0,e|1),spider_ClosePath())}function spider_vectordrawing_ToPaperColor(a){return new paper.Color((a&255)/255,(a>>8&255)/255,(a>>16&255)/255,(a>>24&255)/255)} function spider_VectorSourceColor(a){spider.vectordrawing.sourceColor=spider_vectordrawing_ToPaperColor(a)}function spider_VectorSourceLinearGradient(a,b,c,d){spider.vectordrawing.sourceColor={gradient:{stops:[]},origin:new paper.Point(a,b),destination:new paper.Point(c,d)}}function spider_VectorSourceCircularGradient(a,b,c){spider.vectordrawing.sourceColor={gradient:{stops:[],radial:!0},origin:new paper.Point(a,b),destination:new paper.Point(a+c,b)}} function spider_VectorSourceGradientColor(a,b){spider.vectordrawing.sourceColor.gradient.stops.push([spider_vectordrawing_ToPaperColor(a),b])}function spider_ClosePath(){spider.vectordrawing.path.closePath(!0)} function spider_VectorDrawing_GenericStrokePath(a,b){"undefined"===typeof b&&(b=0);spider.vectordrawing.path.strokeColor=spider.vectordrawing.sourceColor;spider.vectordrawing.path.strokeWidth=a;spider.vectordrawing.path.strokeCap=b&16?"round":b&32?"square":"butt";spider.vectordrawing.path.strokeJoin=b&64?"round":b&128?"bevel":"miter";paper.view.draw();if(0===(b&8)){var c=spider.vectordrawing.path.matrix;spider_ResetPath();spider.vectordrawing.path.matrix=c}} function spider_StrokePath(a,b){"undefined"===typeof b&&(b=0);spider.vectordrawing.path.dashArray=null;spider_VectorDrawing_GenericStrokePath(a,b)}function spider_CustomDashPath(a,b,c,d){"undefined"===typeof c&&(c=0);b=b.array.slice(0);for(d=0;d=e.min&&c<=e.max)}return!0},onChange:function(){p(b,9)}}),k=document.createElement("div");$(k).css("overflow","hidden");k.spiderId=b.id;k.appendChild(a.domNode);b.Disable=function(c){b.isDisabled=c;a._populateGrid()};b.GetState=function(){var b=a.get("value");return c(b)}; b.SetState=function(b){a.set("value",e(b))};b.GetAttribute=function(b){switch(b){case 1:return c(a.attr("constraints").min);case 2:return c(a.attr("constraints").max)}return 0};b.SetAttribute=function(b,c){var d=a.attr("constraints");switch(b){case 1:d.min=e(c);a.attr("constraints",d);a._populateGrid();break;case 2:d.max=e(c),a.attr("constraints",d),a._populateGrid()}};b.SetActive=function(){var a=A(k,"span","dijitDownArrowButton");spider.DigitFocus.focus(a)};b.GetRequiredSize=function(){var a=$(k).find("table").first(), a={width:a.get(0).clientWidth+6,height:a.get(0).clientHeight},b=$(k).find(".dijitCalendarMonthContainer").first();a.height+=b.get(0).clientHeight;b=$(k).find(".dijitCalendarYearContainer").first();a.height+=b.get(0).clientHeight;return a};b.Resize=function(b,c,e,d){var f=u(a.domNode);t(k,b,c,e,d);x(a,0,0,e-f.x,d-f.y)};spider.gadget.register(b,20,k,a);b.Resize(f,g,l,n);b.SetState(m);a._populateGrid();return b.resultId};window.spider_CanvasGadget=function(d,f,g,l,n,m){function h(a){k(a,!1);p(b,65539)} function e(a){k(a,!1);0===a.button?(p(b,65541),b.buttons&=-2):1===a.button?(p(b,65545),b.buttons&=-5):2===a.button&&(p(b,1),p(b,65543),b.buttons&=-3);window.removeEventListener("mouseup",e);window.removeEventListener("mousemove",h)}"undefined"===typeof m&&(m=0);var c=!1,b=spider.gadget.objects.Allocate(d),a=document.createElement("canvas");b.canvas=a;b.mouseX=0;b.mouseY=0;b.mouseWheelDelta=0;b.buttons=0;b.lastKey=0;b.lastInput=0;b.modifiers=0;b.resolutionX=spider_DesktopResolutionX();(new ResizeObserver(function(a){p(b, 15)})).observe(a);m&4&&a.setAttribute("tabindex","0");var k=function(c,e){var d=a.getBoundingClientRect();if(e){if(0>=c.touches.length)return;b.mouseX=c.touches[0].clientX-d.left|0;b.mouseY=c.touches[0].clientY-d.top|0}else b.mouseX=c.clientX-d.left,b.mouseY=c.clientY-d.top;0>b.mouseX&&(b.mouseX=0);0>b.mouseY&&(b.mouseY=0);b.mouseX>=(a.width/b.resolutionX|0)&&(b.mouseX=(a.width/b.resolutionX|0)-1);b.mouseY>=(a.height/b.resolutionX|0)&&(b.mouseY=(a.height/b.resolutionX|0)-1)};$(a).on({click:function(){p(b, 0)},dblclick:function(){p(b,2)},mouseover:function(a){p(b,65537)},touchstart:function(a){k(a,!0);p(b,65537);b.buttons|=1;p(b,65540);c=!0},mouseout:function(a){p(b,65538)},"touchend touchcancel touchleave":function(a){k(a,!0);b.buttons&=-2;p(b,65541);p(b,65538)},touchmove:function(a){k(a,!0);p(b,65539)},mousedown:function(a){if(!c){var d;k(a,!1);0===a.button?(d=65540,b.buttons|=1):1===a.button?(d=65544,b.buttons|=4):2===a.button&&(d=65542,b.buttons|=2);p(b,d);a.preventDefault();window.addEventListener("mouseup", e);window.addEventListener("mousemove",h);if(1===a.button)return!1}},focus:function(){p(b,7)},blur:function(){p(b,8)},wheel:function(a){a=a.originalEvent;b.mouseWheelDelta=0>a.deltaY?1:-1;p(b,65546);return!1},keydown:function(a){b.lastKey=a.keyCode;65<=b.lastKey&&90>=b.lastKey&&(b.lastKey+=32);16==a.keyCode&&(b.modifiers|=1);17==a.keyCode&&(b.modifiers|=4);18==a.keyCode&&(b.modifiers|=2);p(b,65547)},keyup:function(a){b.lastKey=a.keyCode;65<=b.lastKey&&90>=b.lastKey&&(b.lastKey+=32);16==a.keyCode&& (b.modifiers&=-2);17==a.keyCode&&(b.modifiers&=-5);18==a.keyCode&&(b.modifiers&=-3);p(b,65548)},keypress:function(a){b.lastInput=a.which;b.lastInput&&p(b,65549)}});var r=document.createElement("div");r.appendChild(a);m&1&&$(r).addClass("sbCanvasBorder");b.Disable=function(a){b.isDisabled=a};b.GetAttribute=function(c){switch(c){case 1:return a;case 4:return b.buttons;case 2:return b.mouseX*b.resolutionX|0;case 3:return b.mouseY*b.resolutionX|0;case 8:return b.mouseWheelDelta;case 5:return b.lastKey; case 9:return b.lastInput;case 6:return b.modifiers}};b.SetAttribute=function(c,e){switch(c){case 1:a.getContext("2d").drawImage(e,0,0);break;case 7:switch(b.cursor=e,e){case 0:a.style.cursor="default";b.cursor=-1;break;case 3:a.style.cursor="pointer";break;case 1:a.style.cursor="crosshair";break;case 2:a.style.cursor="text";break;case 4:a.style.cursor="wait";break;case 5:a.style.cursor="no-drop";break;case 6:a.style.cursor="move";break;case 7:a.style.cursor="w-resize";break;case 6:a.style.cursor= "s-resize";break;case 8:a.style.cursor="se-resize";break;case 9:a.style.cursor="sw-resize";break;case 10:a.style.cursor="none"}}};b.SetActive=function(){$(a).focus()};b.Resize=function(c,e,d,k){var f=u(r);if(a.width!=(d*b.resolutionX|0)-f.x||a.height!=(k*b.resolutionX|0)-f.y)if(a.width=(d*b.resolutionX|0)-f.x,a.height=(k*b.resolutionX|0)-f.y,0===(m&16)){var g=a.getContext("2d");g.fillStyle="#FFF";g.fillRect(0,0,a.width,a.height)}a.style.width=d+"px";a.style.height=k+"px";t(r,c,e,d-f.x,k-f.y)};spider.gadget.register(b, 33,r,a);m&32&&spider.window.gadgetList.push(r,spider.window.currentWindowId);b.Resize(f,g,l,n);return b.resultId};window.spider_CanvasOutput=function(d){var f;return(f=spider.gadget.objects.Get(d))?{gadget:f,canvas:f.canvas,context:f.canvas.getContext("2d"),stopDrawingCallback:null}:0};window.spider_CanvasVectorOutput=function(d,f){"undefined"===typeof f&&(f=1);var g;return(g=spider.gadget.objects.Get(d))?{gadget:g,canvas:g.canvas,inputUnit:1,outputUnit:f,stopDrawingCallback:null}:0};window.spider_CheckBoxGadget= function(d,f,g,l,n,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d);d="spidercheckbox_"+e.id;var c=new dijit.form.CheckBox({id:d,onClick:function(){p(e,0)}}),b=document.createElement("div"),a=document.createElement("span");a.className="sbVerticalCenter";b.appendChild(a);a.appendChild(c.domNode);var k=put(a,"label",{htmlFor:d});$(k).css("padding-left","5px");$(k).css("display","inline-block");c.label=k;h&1?$(k).css("text-align","right"):h&2&&$(k).css("text-align","center"); e.Disable=function(a){$(k).css("color",a?"gray":"");c.set("disabled",a?!0:!1)};e.GetState=function(){return c.get("checked")?1:0};e.SetState=function(a){-1==a?c.set("value","mixed"):c.set("checked",a)};e.GetText=function(){return k.innerHTML};e.SetText=function(b){k.innerHTML=b;""===b?a.removeChild(k):a.appendChild(k)};e.GetRequiredSize=function(){var a=$(b).css("fontSize")+" "+$(b).css("fontFamily"),a=z(e,a,e.GetText());a.width+=28;a.height+=6;return a};e.Resize=function(e,d,f,g){t(b,e,d,f,g);$(a).width(f); $(a).height(g);$(k).width(f-$(c.domNode).outerWidth(!0)-5)};spider.gadget.register(e,4,b,c);c.startup();e.SetText(m);e.Resize(f,g,l,n);return e.resultId};window.spider_ClearGadgetItems=function(d){var f;(f=spider.gadget.objects.Get(d))&&f.ClearItems&&f.ClearItems()};window.spider_CloseGadgetList=function(){spider.window.gadgetList.pop()};window.spider_ComboBoxGadget=function(d,f,g,l,n,m){"undefined"===typeof m&&(m=0);var h=spider.gadget.objects.Allocate(d),e=0,c=spider_NewList(function(){return{id:null, text:null}}),b=new spider.StoreMemory,a=new dijit.form.ComboBox({store:b,onChange:function(){p(h,9)},onFocus:function(){spider.DigitFocus.focus(a.focusNode);p(h,7)},onBlur:function(){p(h,8)}});m&1||$(a.focusNode).attr("readOnly",!0);var k=document.createElement("div");k.appendChild(a.domNode);$(a._buttonNode).css("height","100%");var r=-1,q=function(){b=new spider.StoreMemory;e=0;spider_ResetList(c);for(var d;d=spider_NextElement(c);)b.add({name:d.text,id:e}),e++;a.set("store",b)};a.watch("item", function(a,b,c){c&&(r=c.id)});h.GetState=function(){return r};h.SetState=function(c){b.get(c)?(a.set("value",b.get(c).name),r=c):(a.set("value",""),r=-1)};h.GetText=function(){return a.get("value")};h.SetText=function(b){a.set("value",b);r=-1};h.AddItem=function(a,d,k,f){-1==a&&(a=spider_ListSize(c));0>=a?spider_ResetList(c):spider_SelectElement(c,a-1);a=spider_AddElement(c);a.id=e;a.text=d;a.imageId=k;b.add({name:"",id:e});d=spider_ListIndex(c);do b.put({name:a.text},b.get(d)),d++;while(a=spider_NextElement(c)); e++};h.RemoveItem=function(a){spider_ListSize(c)>a&&0<=a&&(spider_SelectElement(c,a),spider_DeleteElement(c),q(),r==a&&h.SetState(a))};h.ClearItems=function(){spider_ClearList(c);q();a.set("value","");r=-1};h.CountItems=function(){return spider_ListSize(c)};h.SetColor=function(b,c){C(h,a.focusNode.parentNode,a.focusNode,b,c)};h.GetItemData=function(a){var b;return(b=spider_SelectElement(c,a))?b.data?b.data:0:0};h.SetItemData=function(a,b){var d;if(d=spider_SelectElement(c,a))d.data=b};h.GetItemText= function(a,b){var d;return(d=spider_SelectElement(c,a))?d.text:""};h.SetItemText=function(a,d,e){if(e=spider_SelectElement(c,a))e.text=d,a=b.get(a),a.name=d,b.put(a)};h.GetRequiredSize=function(){var a=$(k).css("fontSize")+" "+$(k).css("fontFamily"),a=z(h,a,"Hg");a.width=50;a.height+=5;return a};h.Resize=function(b,c,d,e){t(k,b,c,d,e);b=u(a.domNode);x(a,0,0,d-b.x,e-b.y);"claro"==spider.gadgetTheme?$(a.focusNode).height(e-b.y-2):$(a.focusNode).height(e-b.y)};spider.gadget.register(h,8,k,a);h.Resize(f, g,l,n);return h.resultId};window.spider_ContainerGadget=function(d,f,g,l,n,m){var h=spider.gadget.objects.Allocate(d);"undefined"===typeof m&&(m=0);var e=new dijit.layout.ContentPane({style:"overflow: hidden; padding: 0px;",content:""}),c=document.createElement("div");e.placeAt(c);m&1?$(c).addClass("sbContainerBorder"):m&4?$(c).addClass("sbContainerBorderSingle"):m&2?$(c).addClass("sbContainerBorderRaised"):m&8&&$(c).addClass("sbContainerBorderDouble");h.GetColor=function(b){return 2==b?h.backColor? h.backColor:-1:-1};h.SetColor=function(b,a){2==b&&($(c).css("background-color",spider_helper_ColorToHtml(a)),h.backColor=a)};h.GetHeight=function(b){return 1==b?B(h.id).width:c.clientHeight};h.GetWidth=function(b){return 1==b?B(h.id).width:c.clientWidth};h.Resize=function(b,a,d,f){var g=u(c);t(c,b,a,d,f);x(e,0,0,d-g.x,f-g.y);e.resize()};spider.gadget.register(h,11,c,e);spider.window.gadgetList.push(e.domNode,spider.window.currentWindowId);h.Resize(f,g,l,n);spider.DojoAspect.after(e,"resize",function(b, a){p(h,15)});return h.resultId};window.spider_CountGadgetItems=function(d){var f;return(f=spider.gadget.objects.Get(d))&&f.CountItems?f.CountItems():0};window.spider_DateGadget=function(d,f,g,l,n,m,h,e){function c(a){a=spider_ReplaceString(a,"%yyyy","yyyy");a=spider_ReplaceString(a,"%mm","MM");return a=spider_ReplaceString(a,"%dd","dd")}function b(a){return new Date(spider_Year(a),spider_Month(a)-1,spider_Day(a))}function a(a){return spider_Date(a.getFullYear(),a.getMonth()+1,a.getDate(),0,0,0)}"undefined"=== typeof m&&(m="%yyyy/%mm/%dd");"undefined"===typeof h&&(h=spider_Date());"undefined"===typeof e&&(e=0);var k=spider.gadget.objects.Allocate(d),r,q=new dijit.form.DateTextBox({constraints:{min:new Date(1601,0,0),max:new Date(9999,0,0),datePattern:c(m)},onChange:function(){p(k,9)}});$(q._buttonNode).css("height","100%");var w=document.createElement("div"),s=0;e&2&&(r=new dijit.form.CheckBox({onClick:function(){r.get("checked")?k.SetState(q.get("value")):k.SetState(0)}}),w.appendChild(r.domNode),s=21, $(q.domNode).css("margin-left",s));w.appendChild(q.domNode);k.Disable=function(a){E(k,q.focusNode.parentNode,q.focusNode,a)};k.GetText=function(){return e&2&&!1===r.get("checked")?"":q.get("displayedValue")};k.SetText=function(a){var b=q.get("value");q.attr("constraints").datePattern=c(a);q.set("value",b)};k.GetState=function(){return e&2&&!1===r.get("checked")?0:a(q.get("value"))};k.SetState=function(a){if(e&2){var c=0===a;k.Disable(c);r.set("checked",!c)}0!==(e&2)&&0===a||q.set("value",b(a))};k.GetAttribute= function(b){switch(b){case 1:return a(q.attr("constraints").min);case 2:return a(q.attr("constraints").max)}return 0};k.SetAttribute=function(a,c){var d=q.attr("constraints");switch(a){case 1:d.min=b(c);q.attr("constraints",d);break;case 2:d.max=b(c),q.attr("constraints",d)}};k.GetColor=function(a){switch(a){case 2:return k.backColor?k.backColor:-1;case 1:return k.frontColor?k.frontColor:-1}return-1};k.SetColor=function(a,b){C(k,q.focusNode.parentNode,q.focusNode,a,b)};k.GetRequiredSize=function(){var a= $(w).css("fontSize")+" "+$(w).css("fontFamily"),a=z(k,a,"Hg");a.width=60;a.height+=5;return a};k.Resize=function(a,b,c,d){t(w,a,b,c,d);a=u(q._popupStateNode);x(q,0,0,c-a.x-s,d-a.y);$(q.domNode).height(d-a.y);"claro"==spider.gadgetTheme?$(q.focusNode).height(d-a.y-2):$(q.focusNode).height(d-a.y)};spider.gadget.register(k,21,w,q);k.SetState(h);k.Resize(f,g,l,n);return k.resultId};window.spider_DisableGadget=function(d,f){var g;if(g=spider.gadget.objects.Get(d))g.Disable?g.Disable(f):g.gadget instanceof dijit._WidgetBase&&g.gadget.set("disabled",f?!0:!1)};window.spider_EditorGadget=function(d,f,g,l,n,m){"undefined"===typeof m&&(m=0);var h=spider.gadget.objects.Allocate(d),e=new dijit.form.SimpleTextarea({style:"overflow: auto; resize: none;",intermediateChanges:!0,onChange:function(){p(h,9)},onFocus:function(){spider.DigitFocus.focus(e.focusNode);p(h,7)},onBlur:function(){p(h,8)}});d=e.domNode;var c=document.createElement("div");c.appendChild(d);h.editor=e;m&2||$(e.focusNode).attr("wrap","off"); m&1&&$(e.focusNode).attr("readOnly",!0);h.Disable=function(b){E(h,e.focusNode,e.focusNode,b)};h.GetText=function(){return e.get("value")};h.SetText=function(b){e.set("value","");e.set("value",b);e.textbox.scrollTop=e.textbox.scrollHeight};h.GetAttribute=function(b){switch(b){case 2:return"off"==$(e.focusNode).attr("wrap")?0:1;case 1:return $(e.focusNode).attr("readOnly")?1:0}return 0};h.SetAttribute=function(b,a){switch(b){case 2:$(e.focusNode).attr("wrap",a?"":"off");break;case 1:$(e.focusNode).attr("readOnly", a?!0:!1)}};h.GetColor=function(b){switch(b){case 2:return h.backColor?h.backColor:-1;case 1:return h.frontColor?h.frontColor:-1}return-1};h.SetColor=function(b,a){C(h,e.focusNode,e.focusNode,b,a)};h.SetFont=function(b){G(e.focusNode,b)};h.Resize=function(b,a,d,f){t(c,b,a,d,f);b=u(e.focusNode);x(e,0,0,d-b.x,f-b.y)};spider.gadget.register(h,22,c,e);h.Resize(f,g,l,n);return h.resultId};window.spider_FrameGadget=function(d,f,g,l,n,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d), c=document.createElement("fieldset");$(c).css("margin",0);$(c).addClass("sbFrameBorder");var b=document.createElement("div");b.appendChild(c);var a=document.createElement("legend");e.legend=a;e.GetText=function(){return a.innerHTML};e.SetText=function(b){a.innerHTML=b;""===b?c.hasChildNodes()&&c.removeChild(a):c.appendChild(a)};e.SetFont=function(a){var c=u(b),d=parseInt($(e.div).css("left"),10),f=parseInt($(e.div).css("top"),10),g=$(b).width()+c.x,c=$(b).height()+c.y;G(b,a);e.Resize(d,f,g,c)};e.GetRequiredSize= function(){var a={width:0,height:0};$.each($(b).children(),function(b,c){a.width+=$(c).outerWidth(!0);a.height+=$(c).outerHeight(!0)});var d=u(c);a.width-=d.x;a.height-=d.y;return a};e.Resize=function(a,d,e,f){t(b,a,d,e,f);a=u(c);t(c,0,0,e-a.x,f-a.y)};e.SetText(m);spider.gadget.register(e,7,b,c);e.Resize(f,g,l,n);return e.resultId};window.spider_FreeGadget=F;window.spider_GadgetHeight=L;window.spider_GadgetID=function(d){var f;return(f=spider.gadget.objects.Get(d))?f:null};window.spider_GadgetToolTip= function(d,f){var g;if(g=spider.gadget.objects.Get(d))g.tooltip||(g.tooltip=new dijit.Tooltip({connectId:g.div})),g.tooltip.set("label",f)};window.spider_GadgetType=function(d){if(d=spider.gadget.objects.Get(d))return d.type};window.spider_GadgetWidth=M;window.spider_GadgetX=N;window.spider_GadgetY=O;window.spider_GetActiveGadget=function(){var d=-1,f;f=spider.DigitFocus.curNode;for(var g;!g&&f;)f.hasOwnProperty("spiderId")?g=f:(g=spider.DigitRegistry.byNode(f),f=f.parentElement?f.parentElement:null, g&&!g.hasOwnProperty("spiderId")&&(g=null));(f=g)&&f.hasOwnProperty("spiderId")&&(d=f.spiderId);return d};window.spider_GetGadgetAttribute=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&&g.GetAttribute?g.GetAttribute(f):0};window.spider_GetGadgetColor=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&&g.GetColor?g.GetColor(f):0};window.spider_GetGadgetData=function(d){var f;return(f=spider.gadget.objects.Get(d))?f.userData:0};window.spider_GetGadgetItemAttribute=function(d,f, g,l){"undefined"===typeof l&&(l=-1);var n;return(n=spider.gadget.objects.Get(d))&&n.GetItemAttribute?n.GetItemAttribute(f,g,l):0};window.spider_GetGadgetItemData=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&&g.GetItemData?g.GetItemData(f):0};window.spider_GetGadgetItemState=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&&g.GetItemState?g.GetItemState(f):0};window.spider_GetGadgetItemText=function(d,f,g){"undefined"===typeof g&&(g=-1);var l;return(l=spider.gadget.objects.Get(d))&& l.GetItemText?l.GetItemText(f,g):""};window.spider_GetGadgetState=function(d){var f;return(f=spider.gadget.objects.Get(d))&&f.GetState?f.GetState():0};window.spider_GetGadgetText=function(d){var f;return(f=spider.gadget.objects.Get(d))&&f.GetText?f.GetText():""};window.spider_HideGadget=function(d,f){var g;(g=spider.gadget.objects.Get(d))&&$(g.div).css("display",f?"none":"block")};window.spider_HyperLinkGadget=function(d,f,g,l,n,m,h,e){"undefined"===typeof e&&(e=0);var c=spider.gadget.objects.Allocate(d), b=document.createElement("a");b.innerHTML=m;b.href="";0===(e&1)&&$(b).css("text-decoration","none");$(b).hover(function(a){$(this).css("color",spider_helper_ColorToHtml("mouseenter"===a.type?h:c.frontColor))});$(b).on("click",function(a){a.preventDefault();a.stopPropagation();p(c,0)});var a=document.createElement("div"),k=document.createElement("span");k.className="sbVerticalCenter";a.appendChild(k);k.appendChild(b);c.GetText=function(){return b.innerHTML};c.SetText=function(a){b.innerHTML=a};c.GetColor= function(a){switch(a){case 2:return c.backColor?c.backColor:-1;case 1:return c.frontColor?c.frontColor:-1}return-1};c.SetColor=function(d,e){switch(d){case 2:$(a).css("background-color",spider_helper_ColorToHtml(e));c.backColor=e;break;case 1:b.style.color=spider_helper_ColorToHtml(e),c.frontColor=e}};c.GetRequiredSize=function(){var b=$(a).css("fontSize")+" "+$(a).css("fontFamily"),b=z(c,b,c.GetText());b.width+=16;b.height+=8;return b};c.Resize=function(b,c,d,e){t(a,b,c,d,e);$(k).width(d);$(k).height(e)}; c.SetColor(1,0);spider.gadget.register(c,10,a,b);c.Resize(f,g,l,n);return c.resultId};window.spider_ImageGadget=function(d,f,g,l,n,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d),c=document.createElement("div"),b=document.createElement("canvas");b.style.width=l+"px";b.style.height=n+"px";put(c,b);h&2&&$(c).addClass("sbImageBorder");$(c).on({click:function(){p(e,0)},dblclick:function(){p(e,2)},mouseup:function(a){3===a.which&&1===a.originalEvent.detail&&p(e,1)}});e.GetState= function(){return e.image};e.SetState=function(a){a?(b.width!=a.width&&(b.width=a.width),b.height!=a.height&&(b.height=a.height),b.getContext("2d").drawImage(a,0,0)):(b.width=0,b.height=0);e.image=a};e.Resize=function(a,d,e,f){var g=u(c);b.style.width=e+"px";b.style.height=f+"px";t(c,a,d,e-g.x,f-g.y)};e.Free=function(){$(b).remove();b=null;c.parentNode&&$(c).remove()};spider.gadget.register(e,9,c,c);e.Resize(f,g,l,n);e.SetState(m);return e.resultId};window.spider_IsGadget=function(d){var f;return(f= spider.gadget.objects.Get(d))&&f.div.parentNode?1:0};window.spider_ListIconGadget=function(d,f,g,l,n,m,h,e){function c(a,b){for(var c=a;c<=b;c++)q.put({id:c})}function b(){for(var a=0;a=b?spider_ResetList(k):spider_SelectElement(k,b-1);b=spider_AddElement(k);b.text=d;w&1&&(b.checkBox=new dijit.form.CheckBox({onClick:function(){p(a,9)}}));e&&(b.image=e);d=spider_ListIndex(k);q.add({id:spider_ListSize(k)-1});c(d, spider_ListSize(k)-1)};a.RemoveItem=function(b){var d=spider_ListSize(k);if(d>b&&0<=b){var e=a.GetState();e>b&&a.SetState(e-1);spider_SelectElement(k,b);spider_DeleteElement(k);q.remove(d-1);c(b,d-2)}};a.ClearItems=function(){spider_ClearList(k);q=new r;s.set("collection",q)};a.CountItems=function(){return spider_ListSize(k)};a.AddColumn=function(a,c,d){v.splice(a,0,{field:"",index:0,label:c,width:d,sortable:!1,renderCell:function(a,b,c,d){b=spider_SelectElement(k,a.id);a=put("div");e&4||$(c).css("border", "none");0===this.index&&(b.checkBox&&(c=put("div"),$(c).css("float","left"),$(c).css("padding-right","8px"),put(c,b.checkBox.domNode),a.appendChild(c)),b.image&&(c=put("div"),$(c).css("float","left"),$(c).css("padding-right","8px"),c.className=spider.image.GetCSS(b.image),a.appendChild(c)));c=put("div",spider_StringField(b.text,this.index+1,spider_Chr(10)));$(c).css("white-space","nowrap");a.appendChild(c);return a}});b()};a.RemoveColumn=function(a){v.splice(a,1);b()};a.GetState=function(){var b= -1;if(a.previousSelection)b=a.previousSelection;else for(var c in s.selection){b=c;break}return+b};a.SetState=function(a){s.clearSelection();0<=a&&a=b?spider_ResetList(a):spider_SelectElement(a,b-1);spider_AddElement(a).text=c;b=spider_ListIndex(a);k.add({id:spider_ListSize(a)-1});e(b,spider_ListSize(a)-1)};c.RemoveItem=function(b){var d=spider_ListSize(a);if(d>b&&0<=b){var f=c.GetState();f>b&&c.SetState(f-1);spider_SelectElement(a,b);spider_DeleteElement(a);k.remove(d-1);e(b,d-2)}};c.ClearItems=function(){h()};c.CountItems= function(){return spider_ListSize(a)};c.GetState=function(){var a=-1;if(c.previousSelection)a=c.previousSelection;else for(var b in r.selection){a=b;break}return+a};c.SetState=function(b){r.clearSelection();0<=b&&bc.oldValue?p(c,4):aa.get("maximum")?b=a.get("maximum"):b=d?spider_ResetList(c):spider_SelectElement(c,d-1);d=spider_AddElement(c);d.id=a;d.text=e;d.subLevel=g;f&&(d.image=f);f="";var h;spider_ListIndex(c);if(0a&&0<=a&&(a=spider_SelectElement(c,a),spider_DeleteElement(c),b.remove(a.id),q.set("selectedItems",[]),s())};e.ClearItems=function(){for(var a=spider_ListSize(c),b=0;bb)if(d=0,2==b){if(k&32){if(f>=g-3)return 0}else if(f>=g-4)return 0;d|=a.viewu8[c++]<<10;d|=a.viewu8[c++]<<2;e.viewu8[f++]=h[d>>12&63];e.viewu8[f++]=h[d>>6&63];e.viewu8[f++]=h[d&63];0===(k&32)&&(e.viewu8[f++]=61)}else{if(k&32){if(f>=g-2)return 0}else if(f>=g-4)return 0;d|=a.viewu8[c++]<<4;e.viewu8[f++]=h[d>>6&63];e.viewu8[f++]=h[d&63];0===(k&32)&&(e.viewu8[f++]=61,e.viewu8[f++]=61)}else{if(f>=g-4)return 0;d=a.viewu8[c++]<<16;d|=a.viewu8[c++]<<8;d|= a.viewu8[c++];e.viewu8[f++]=h[d>>18&63];e.viewu8[f++]=h[d>>12&63];e.viewu8[f++]=h[d>>6&63];e.viewu8[f++]=h[d&63]}b-=3}e.viewu8[f]=0;return f} function spider_Base64DecoderBuffer(a,c,b,e,d,g){var k=0,h,f=spider.cipher.base64DecodingTable;if(0===spider.cipher.isBase64DecodingTable){spider.cipher.isBase64DecodingTable=1;var l=0;for(h=65;90>=h;h++)f[h]=l++;for(h=97;122>=h;h++)f[h]=l++;for(h=48;57>=h;h++)f[h]=l++;f[45]=l;f[43]=l;l++;f[95]=l;f[47]=l}h=d;if(0b||k>=g)return 0;d=f[a.viewu8[c++]]<<18;d|=f[a.viewu8[c++]]<<12;e.viewu8[h++]=d>>16;k++;if(0!==a.viewu8[c]&& 61!==a.viewu8[c]){if(k>=g)return 0;d|=f[a.viewu8[c++]]<<6;e.viewu8[h++]=d>>8;k++}if(0!==a.viewu8[c]&&61!==a.viewu8[c]){if(k>=g)return 0;d|=f[a.viewu8[c++]];e.viewu8[h++]=d;k++}b-=4}return k}function spider_Base64Decoder(a,c,b,e){var d=0,g=a.length;if(0c&&(e=c-d),b+=String.fromCharCode.apply(null,a.subarray(d,d+e));return b}function spider_Base64Encoder(a,c,b,e){"undefined"===typeof e&&(e=0);var d=b+0.34*b+128,g=spider_AllocateMemory(d);a=spider_Base64EncoderBuffer(a,c,b,g,0,d,e);return 0a.dimensions[0])for(c=a.dimensions[0]+1;c<=b;c++)a.array[c]=8==a.type?"":a.structure?new a.structure:0;a.dimensions[0]=b}else a.dimensions[a.nbDimensions-1]=b;return a.array}; spider.http={jqXHR:null,timeout:3E4};function spider_HTTPInfo(a){var c=spider.http.jqXHR;switch(a){case 0:return""+c.status;case 1:return c.statusText;case 3:return c.getAllResponseHeaders()}return""}function spider_HTTPTimeout(a){spider.http.timeout=a} function spider_HTTPRequest(a,c,l,h,d,e){"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e={map:{}});for(var g=Object.keys(e.map),k={},b="GET",f=0;fa.size-1)return 0;a.position++;return a.view8[a.position-1]}return 0} function spider_ReadAsciiCharacter(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-1)return 0;a.position++;return a.viewu8[a.position-1]}return 0}function spider_ReadUnicodeCharacter(a){var c;return(c=spider.file.objects.Get(a))?spider_File_ReadCharacter(c,25):0}function spider_ReadWord(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-2)return 0;a.position+=2;return a.view.getInt16(a.position-2)}return 0} function spider_ReadLong(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-4)return 0;a.position+=4;return a.view.getInt32(a.position-4)}return 0}function spider_ReadInteger(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-8)return 0;a.position+=8;return a.jview.getInt64(a.position-8)}return 0}function spider_ReadQuad(a){return spider_ReadInteger(a)} function spider_ReadFloat(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-4)return 0;a.position+=4;return a.view.getFloat32(a.position-4)}return 0}function spider_ReadDouble(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-8)return 0;a.position+=8;return a.view.getFloat64(a.position-8)}return 0} function spider_File_ReadUTF8Character(a){var c;buffer=a.viewu8;if(a.position>a.size-1)return 0;c=buffer[a.position++];return 0===(c&128)?c:192==(c&224)?a.position>a.size-1?0:(c&31)<<6|buffer[a.position++]&63:224==(c&240)?a.position>a.size-2?0:(c&15)<<12|(buffer[a.position++]&63)<<6|(buffer[a.position++]&63)<<0:0} function spider_File_ReadCharacter(a,c){switch(c){case 24:if(a.position>a.size-1)return 0;a.position++;return a.viewu8[a.position-1];case 25:if(a.position>a.size-2)return 0;a.position+=2;return a.viewu8[a.position-1]<<8|a.viewu8[a.position-2];default:return spider_File_ReadUTF8Character(a)}}function spider_ReadCharacter(a,c){"undefined"===typeof c&&(c=2);var b;return(b=spider.file.objects.Get(a))?spider_File_ReadCharacter(b,c):0} function spider_ReadString(a,c,b){"undefined"===typeof c&&(c=0);"undefined"===typeof b&&(b=-1);var e,d="",f=c&31;if(a=spider.file.objects.Get(a))for(0===f&&(f=a.format);b;){e=spider_File_ReadCharacter(a,f);if(0===(c&65536)&&(13===e||10===e)){13===e&&10===a.view8[a.position]&&a.position++;break}else if(0===e)break;d+=String.fromCharCode(e);b--}return d} function spider_ReadStringFormat(a){var c=24;if(a=spider.file.objects.Get(a)){var b=a.size-a.position,e,d,f,h;2<=b&&(e=a.viewu8[a.position],d=a.viewu8[a.position+1]);3<=b&&(f=a.viewu8[a.position+2]);4<=b&&(h=a.viewu8[a.position+3]);2<=b&&255==e&&254==d?(c=25,a.position+=2):3<=b&&239==e&&187==d&&191==f?(c=2,a.position+=3):2<=b&&254==e&&255==d?(c=4,a.position+=2):4<=b&&255==e&&254==d&&0===f&&0===h?(c=5,a.position+=4):4<=b&&0===e&&0===d&&254==f&&255==h&&(c=6,a.position+=4)}return c} function spider_WriteByte(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,1),b.view8[b.position++]=c,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteAsciiCharacter(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,1),b.view8[b.position++]=c,b.position>b.size&&(b.size=b.position),1):0} function spider_WriteUnicodeCharacter(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,2),b.position+=spider_Memory_WriteCharacter(b.viewu8,b.position,c,25),b.position>b.size&&(b.size=b.position),1):0}function spider_WriteWord(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,2),b.view.setInt16(b.position,c),b.position+=2,b.position>b.size&&(b.size=b.position),1):0} function spider_WriteLong(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,4),b.view.setInt32(b.position,c),b.position+=4,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteFloat(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,4),b.view.setFloat32(b.position,c),b.position+=4,b.position>b.size&&(b.size=b.position),1):0} function spider_WriteDouble(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,8),b.view.setFloat64(b.position,c),b.position+=8,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteInteger(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,8),b.jview.setInt64(b.position,c),b.position+=8,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteQuad(a,c){return spider_WriteInteger(a,c)} function spider_WriteString(a,c,b){"undefined"===typeof b&&(b=0);if(a=spider.file.objects.Get(a)){0===b&&(b=a.format);for(var e=c.length,d=0;da.size&&(a.size=a.position);return 1}return 0}function spider_WriteStringN(a,c,b){return spider_WriteString(a,c+"\n",b)} function spider_WriteStringFormat(a,c){switch(c){case 25:spider_WriteByte(a,255);spider_WriteByte(a,254);break;case 2:spider_WriteByte(a,239);spider_WriteByte(a,187);spider_WriteByte(a,191);break;case 4:spider_WriteByte(a,254);spider_WriteByte(a,255);break;case 5:spider_WriteByte(a,255);spider_WriteByte(a,254);spider_WriteByte(a,0);spider_WriteByte(a,0);break;case 6:spider_WriteByte(a,0),spider_WriteByte(a,0),spider_WriteByte(a,254),spider_WriteByte(a,255)}} function spider_WriteCharacter(a,c,b){"undefined"===typeof b&&(b=2);return(a=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(a,4),a.position+=spider_Memory_WriteCharacter(a.viewu8,a.position,c,b),a.position>a.size&&(a.size=a.position),1):0}function spider_FetchData(a,c){var b;if(b=spider.file.objects.Get(a))b.bufferPosition+=b.position,b.position=0,b.reader.readAsArrayBuffer(b.localFile.slice(b.bufferPosition,b.bufferPosition+c))} function spider_FileProgress(a){var c;return(c=spider.file.objects.Get(a))?c.progress:-1}function spider_FileSeek(a,c,b){if(a=spider.file.objects.Get(a))a.position=1==b?a.position+c:c,a.position>a.size?a.position=a.size:0>a.position&&(a.position=0)}function spider_Eof(a){var c;return(c=spider.file.objects.Get(a))?c.bufferPosition+c.position==c.size:0} function spider_CreateFile(a,c,b,e){a=spider.file.objects.Allocate(a);a.position=0;a.bufferPosition=0;a.callback=b;a.filename=c;a.flags=e;a.chunkSize=16384;a.size=0;a.buffer=new ArrayBuffer(a.chunkSize);a.view8=new Int8Array(a.buffer);a.viewu8=new Uint8Array(a.buffer);a.view=new DataView(a.buffer);a.jview=new JDataView(a.buffer);c=e&31;0===c&&(c=2);a.format=c;return a.resultId} function spider_File_CheckBufferSize(a,c){if(a.buffer.byteLengtha.size&&(a.size=a.position),1):0} function spider_file_Download(a,c,b){function e(a){window.resolveLocalFileSystemURL(a,function(a){var b="";switch(device.platform){case "Android":b="file:///storage/emulated/0/Download";break;case "iOS":b=cordova.file.documentsDirectory+"Download"}window.resolveLocalFileSystemURL(b,function(b){a.moveTo(b,void 0,function(a){console.log("SUCESS!")},function(a){console.error(a)})},function(a){console.error(a)})},function(a){console.error(a)})}if(window.cordova){b="";switch(device.platform){case "Android":b= cordova.file.externalDataDirectory;break;case "iOS":b=cordova.file.documentsDirectory}var d=b;window.resolveLocalFileSystemURL(d,function(b){b.getFile(c,{create:!0},function(b){b.createWriter(function(b){b.write(a);b.onwriteend=function(){e(d+c)};b.onerror=function(a){console.error(a)}},function(a){console.error(a)})},function(a){console.error(a)})},function(a){console.error(a)})}else saveAs(a,c)} function spider_ExportFile(a,c,b){"undefined"===typeof b&&(b=65536);if(a=spider.file.objects.Get(a)){var e=new Blob([new Int8Array(a.buffer,0,a.size)],{type:c});b&65536&&spider_file_Download(e,a.filename,c);return 1}return 0}function spider_ExportFileMemory(a){var c;return(a=spider.file.objects.Get(a))?(c=spider_AllocateMemory(a.size),c.view8.set(new Int8Array(a.buffer,0,a.size),0,c.byteLength),c):0}function spider_IsFile(a){return spider.file.objects.Is(a)} function spider_FileID(a){var c;return(c=spider.file.objects.Get(a))?c.buffer:0}; function general$f_parselanguages(v_result) { var v_i=0; var v_count=0; spiderLine=2097253;;; spiderLine=2097256; v_result=datamodel$f_stripprefix(v_result,_S9); spiderLine=2097257; v_count=datamodel$f_getrecordcount(v_result); spiderLine=2097259; v_i=1; for (;v_count>=v_i;v_i+=1) { spiderLine=2097260; spider_AddElement_DEBUG(datamodel$t_Language); spiderLine=2097261; datamodel$t_Language.current._s=datamodel$f_getrecord(v_result,v_i); spiderLine=2097262; } spiderLine=2097263; return 0; } function general$f_init() { spiderLine=2097182; spiderLine=2097184; spider_HTTPRequest(0,_S1,_S2,general$f_loadingcallback,0); spiderLine=2097185; spider_HTTPRequest(0,_S1,_S3,general$f_loadingcallback,1); spiderLine=2097186; spider_HTTPRequest(0,_S1,_S4,general$f_loadingcallback,3); spiderLine=2097187; spider_HTTPRequest(0,_S1,_S5,general$f_loadingcallback,2); spiderLine=2097188; return 0; } function general$f_parsetags(v_result) { var v_i=0; var v_entry=""; var v_count=0; spiderLine=2097265;;;; spiderLine=2097268; v_result=datamodel$f_stripprefix(v_result,_S10); spiderLine=2097269; v_count=datamodel$f_getrecordcount(v_result); spiderLine=2097271; v_i=1; for (;v_count>=v_i;v_i+=1) { spiderLine=2097272; v_entry=datamodel$f_getrecord(v_result,v_i); spiderLine=2097273; spider_AddElement_DEBUG(datamodel$t_Tags); spiderLine=2097274; datamodel$t_Tags.current._ID=spider_Val(datamodel$f_getfield(v_entry,1)); spiderLine=2097275; datamodel$t_Tags.current._DefaultName=datamodel$f_getfield(v_entry,2); spiderLine=2097276; datamodel$t_Tags.current._Color=datamodel$f_getfield(v_entry,3); spiderLine=2097277; datamodel$t_Tags.current._BinaryID=spider_BankerRound(spider_Pow(2,spider_ListIndex_DEBUG(datamodel$t_Tags))); spiderLine=2097278; } spiderLine=2097279; return 0; } function general$f_loadingcallback(v_success,v_result,v_userdata) { spiderLine=2097194; spiderLine=2097195; if (!(v_success)) { spiderLine=2097196; spider.debug.Print(_S6+spider_Str(v_userdata)); spiderLine=2097197; if (1) return 0; } spiderLine=2097198; spiderLine=2097200; var sb_select1=v_userdata; spiderLine=2097201; if (sb_select1==0) { spiderLine=2097202; general$f_parsefiles(v_result); spiderLine=2097203; } else if (sb_select1==1) { spiderLine=2097204; general$f_parsetags(v_result); spiderLine=2097205; } else if (sb_select1==2) { spiderLine=2097206; general$f_parsearticles(v_result); spiderLine=2097207; } else if (sb_select1==3) { spiderLine=2097208; general$f_parselanguages(v_result); } spiderLine=2097211; general$g_loadingprogress=(general$g_loadingprogress+1); spiderLine=2097212; if (general$g_loadingprogress==4) { spiderLine=2097213; mainwindow$f_open(); } spiderLine=2097214; spiderLine=2097215; return 0; } function general$f_parsefiles(v_result) { var v_i=0; var v_entry=""; var v_count=0; spiderLine=2097221;;;; spiderLine=2097224; v_result=datamodel$f_stripprefix(v_result,_S7); spiderLine=2097225; v_count=datamodel$f_getrecordcount(v_result); spiderLine=2097227; v_i=1; for (;v_count>=v_i;v_i+=1) { spiderLine=2097228; v_entry=datamodel$f_getrecord(v_result,v_i); spiderLine=2097229; spider_AddElement_DEBUG(datamodel$t_Files); spiderLine=2097230; datamodel$t_Files.current._ID=spider_Val(datamodel$f_getfield(v_entry,1)); spiderLine=2097231; datamodel$t_Files.current._Name=datamodel$f_getfield(v_entry,2); spiderLine=2097232; datamodel$t_Files.current._Type=spider_GetMapElement(datamodel$m_MIMETypes,spider_GetExtensionPart_DEBUG(datamodel$t_Files.current._Name))._s; spiderLine=2097233; } spiderLine=2097234; return 0; } function general$f_parsearticles(v_result) { var v_i=0; var v_entry=""; var v_count=0; spiderLine=2097236;;;; spiderLine=2097239; v_result=datamodel$f_stripprefix(v_result,_S8); spiderLine=2097240; v_count=datamodel$f_getrecordcount(v_result); spiderLine=2097242; v_i=1; for (;v_count>=v_i;v_i+=1) { spiderLine=2097243; v_entry=datamodel$f_getrecord(v_result,v_i); spiderLine=2097244; spider_AddElement_DEBUG(datamodel$t_Articles); spiderLine=2097245; datamodel$t_Articles.current._ID=spider_Val(datamodel$f_getfield(v_entry,1)); spiderLine=2097246; datamodel$t_Articles.current._Title=datamodel$f_getfield(v_entry,2); spiderLine=2097247; datamodel$t_Articles.current._Draft=spider_Val(datamodel$f_getfield(v_entry,3)); spiderLine=2097248; datamodel$t_Articles.current._Tags=spider_Val(datamodel$f_getfield(v_entry,4)); spiderLine=2097249; datamodel$t_Articles.current._Date=spider_Val(datamodel$f_getfield(v_entry,5)); spiderLine=2097250; } spiderLine=2097251; return 0; } function mainwindow$f_handler_tags() { spiderLine=3146242; spiderLine=3146243; if (mainwindow$g_state._CurrentSelection!=3) { spiderLine=3146244; mainwindow$f_changeselection(); spiderLine=3146245; mainwindow$g_state._CurrentSelection=3; spiderLine=3146246; mainwindow$f_setmenuhighlight(mainwindow$g_menubar._Tags); spiderLine=3146247; spider_HideGadget_DEBUG(mainwindow$g_tagslist._Container,0); spiderLine=3146248; mainwindow$f_handler_resize(); } spiderLine=3146249; spiderLine=3146250; return 0; } function mainwindow$f_sanitizeurl(v_inputstring) { var v_charcode=0; var v_i=0; var v_result=""; var v_len=0; var v_char=""; spiderLine=3146069;;;;; spiderLine=3146070; v_len=spider_Len(v_inputstring); spiderLine=3146072; v_i=1; for (;v_len>=v_i;v_i+=1) { spiderLine=3146073; v_char=spider_Mid(v_inputstring,v_i,1); spiderLine=3146074; v_charcode=spider_Asc(v_char); spiderLine=3146075; if ((v_charcode>=65 && v_charcode<=90) || (v_charcode>=97 && v_charcode<=122) || (v_charcode>=48 && v_charcode<=57) || v_char==_S44 || v_char==_S45 || v_char==_S46 || v_char==_S47) { spiderLine=3146076; v_result=v_result+v_char; } spiderLine=3146077; spiderLine=3146078; } spiderLine=3146079; if (1) return v_result; spiderLine=3146080; return ""; } function mainwindow$f_newfile_callback() { spiderLine=3146493; spiderLine=3146494; if (spider_NextSelectedFile_DEBUG()) { spiderLine=3146495; spider_OpenFile_DEBUG(-1,spider_SelectedFileName_DEBUG(),mainwindow$f_openfile_callback,65536); } spiderLine=3146496; spiderLine=3146497; return 0; } function mainwindow$f_updatearticle_callback(v_success,v_result,v_tags) { var v_item=0; spiderLine=3146400; spiderLine=3146401; if (!(v_success)) { spiderLine=3146402; spider_MessageRequester_DEBUG(_S63); spiderLine=3146403; if (1) return 0; } spiderLine=3146404; spiderLine=3146406; if (datamodel$f_findarticlebyid(mainwindow$g_state._CurrentArticleID)) { spiderLine=3146407; datamodel$t_Articles.current._Date=spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._Date); spiderLine=3146408; datamodel$t_Articles.current._Draft=spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._CheckboxDraft); spiderLine=3146409; datamodel$t_Articles.current._Title=spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle); spiderLine=3146410; datamodel$t_Articles.current._Tags=v_tags; spiderLine=3146412; v_item=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon); spiderLine=3146413; spider_SetGadgetItemText_DEBUG(mainwindow$g_articlelist._ListIcon,v_item,datamodel$f_formatarticlelistitem(datamodel$t_Articles.current)); spiderLine=3146414; mainwindow$f_handler_articles(); } spiderLine=3146415; spiderLine=3146416; return 0; } function mainwindow$f_open() { spiderLine=3145878; spiderLine=3145879; mainwindow$g_state._Window=spider_OpenWindow_DEBUG(-1,0,0,10,10,_S11,4096); spiderLine=3145880; mainwindow$g_state._CurrentSelection=0; spiderLine=3145882; mainwindow$f_createmenubar(); spiderLine=3145883; mainwindow$f_createarticlelistview(); spiderLine=3145884; mainwindow$f_createarticleeditorview(); spiderLine=3145885; mainwindow$f_createfilesview(); spiderLine=3145886; mainwindow$f_createtagslistview(); spiderLine=3145887; mainwindow$f_createtageditorview(); spiderLine=3145889; spider_BindEvent_DEBUG(7,mainwindow$f_handler_resize); spiderLine=3145890; mainwindow$f_handler_resize(); spiderLine=3145891; return 0; } function mainwindow$f_edittag_callback(v_success,v_result,v_userdata) { var v_entry=""; spiderLine=3146602;; spiderLine=3146605; if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S82))) { spiderLine=3146606; spider_MessageRequester_DEBUG(_S83); spiderLine=3146607; if (1) return 0; } spiderLine=3146608; spiderLine=3146610; v_result=datamodel$f_stripprefix(v_result,_S82); spiderLine=3146612; v_entry=datamodel$f_getrecord(v_result,1); spiderLine=3146613; spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._StringName,datamodel$f_getfield(v_entry,1)); spiderLine=3146614; spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._StringColor,datamodel$f_getfield(v_entry,2)); spiderLine=3146616; spider_ResetList_DEBUG(mainwindow$g_tageditor._LanguageTabs); while (spider_NextElement_DEBUG(mainwindow$g_tageditor._LanguageTabs)) { spiderLine=3146618; v_entry=datamodel$f_getrecord(v_result,(spider_ListIndex_DEBUG(mainwindow$g_tageditor._LanguageTabs)+2)); spiderLine=3146619; spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._LanguageTabs.current._Name,v_entry); spiderLine=3146620; } il_wend113:; spiderLine=3146622; mainwindow$f_changeselection(); spiderLine=3146623; mainwindow$g_state._CurrentSelection=4; spiderLine=3146624; spider_HideGadget_DEBUG(mainwindow$g_tageditor._Container,0); spiderLine=3146625; mainwindow$f_handler_resize(); spiderLine=3146626; return 0; } function mainwindow$f_createtagslistview() { spiderLine=3146018; spiderLine=3146019; mainwindow$g_tagslist._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10); spiderLine=3146021; mainwindow$g_tagslist._ListIcon=spider_ListIconGadget_DEBUG(-1,0,0,10,10,_S33,200); spiderLine=3146022; spider_BindGadgetEvent_DEBUG(mainwindow$g_tagslist._ListIcon,mainwindow$f_handler_edittag,2); spiderLine=3146023; spider_AddGadgetColumn_DEBUG(mainwindow$g_tagslist._ListIcon,1,_S38,100); spiderLine=3146025; spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) { spiderLine=3146025; spiderLine=3146026; spider_AddGadgetItem_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$f_formattaglistitem(datamodel$t_Tags.current)); spiderLine=3146027; spider_SetGadgetItemData_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._ID); spiderLine=3146028; } spiderLine=3146030; mainwindow$g_tagslist._ButtonNew=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S39); spiderLine=3146031; mainwindow$g_tagslist._ButtonEdit=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S40); spiderLine=3146032; spider_BindGadgetEvent_DEBUG(mainwindow$g_tagslist._ButtonNew,mainwindow$f_handler_newtag); spiderLine=3146033; spider_BindGadgetEvent_DEBUG(mainwindow$g_tagslist._ButtonEdit,mainwindow$f_handler_edittag); spiderLine=3146035; spider_CloseGadgetList_DEBUG(); spiderLine=3146036; spider_HideGadget_DEBUG(mainwindow$g_tagslist._Container,1); spiderLine=3146037; return 0; } function mainwindow$f_handler_deletearticle() { var v_selecteditem=0; var v_articleid=0; spiderLine=3146268; spiderLine=3146269; v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon); spiderLine=3146270; if (v_selecteditem>-1) { spiderLine=3146271; v_articleid=spider_GetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,v_selecteditem); spiderLine=3146272; spider_HTTPRequest(1,_S1,_S50+spider_Str(v_articleid),mainwindow$f_deletearticle_callback); } spiderLine=3146273; spiderLine=3146274; return 0; } function mainwindow$f_handler_filelisticon() { var v_selecteditem=0; var v_url=""; var v_eventtype=0; spiderLine=3146339;; spiderLine=3146340; v_eventtype=spider_EventType(); spiderLine=3146341; v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_filesview._ListIcon); spiderLine=3146343; if (v_selecteditem>-1) { spiderLine=3146344; v_url=_S58+spider_RemoveString_DEBUG(spider_GetGadgetItemText_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem,0),_S47,0,0,1); spiderLine=3146345; if (v_eventtype==2) { spiderLine=3146346; mainwindow$f_openurlinnewtab(v_url); spiderLine=3146347; } else if (v_eventtype==1) { spiderLine=3146348; spider_SetClipboardText(v_url); } spiderLine=3146349; } spiderLine=3146350; spiderLine=3146351; return 0; } function mainwindow$f_createarticlelistview() { spiderLine=3145929; spiderLine=3145930; mainwindow$g_articlelist._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10); spiderLine=3145932; mainwindow$g_articlelist._ListIcon=spider_ListIconGadget_DEBUG(-1,0,0,10,10,_S17,200); spiderLine=3145933; spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ListIcon,mainwindow$f_handler_editarticle,2); spiderLine=3145934; spider_AddGadgetColumn_DEBUG(mainwindow$g_articlelist._ListIcon,1,_S18,50); spiderLine=3145935; spider_AddGadgetColumn_DEBUG(mainwindow$g_articlelist._ListIcon,2,_S19,100); spiderLine=3145937; spider_ResetList(datamodel$t_Articles); while (spider_NextElement(datamodel$t_Articles)) { spiderLine=3145937; spiderLine=3145938; spider_AddGadgetItem_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$f_formatarticlelistitem(datamodel$t_Articles.current)); spiderLine=3145939; spider_SetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$t_Articles.current._ID); spiderLine=3145940; } spiderLine=3145942; mainwindow$g_articlelist._ButtonNew=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S20); spiderLine=3145943; mainwindow$g_articlelist._ButtonEdit=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S21); spiderLine=3145944; mainwindow$g_articlelist._ButtonDelete=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S22); spiderLine=3145945; spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ButtonNew,mainwindow$f_handler_newarticle); spiderLine=3145946; spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ButtonEdit,mainwindow$f_handler_editarticle); spiderLine=3145947; spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ButtonDelete,mainwindow$f_handler_deletearticle); spiderLine=3145949; spider_CloseGadgetList_DEBUG(); spiderLine=3145950; return 0; } function mainwindow$f_handler_newtag() { spiderLine=3146357; spiderLine=3146358; spider_HTTPRequest(0,_S1,_S59,mainwindow$f_newtag_callback); spiderLine=3146359; return 0; } function mainwindow$f_updatetag_callback(v_success,v_result,v_userdata) { var v_item=0; spiderLine=3146628; spiderLine=3146629; if (!(v_success)) { spiderLine=3146630; spider_MessageRequester_DEBUG(_S84); spiderLine=3146631; if (1) return 0; } spiderLine=3146632; spiderLine=3146634; if (datamodel$f_findtagbyid(mainwindow$g_state._CurrentTagID)) { spiderLine=3146635; datamodel$t_Tags.current._DefaultName=spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringName); spiderLine=3146636; datamodel$t_Tags.current._Color=spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringColor); spiderLine=3146638; v_item=spider_GetGadgetState_DEBUG(mainwindow$g_tagslist._ListIcon); spiderLine=3146639; spider_SetGadgetItemText_DEBUG(mainwindow$g_tagslist._ListIcon,v_item,datamodel$f_formattaglistitem(datamodel$t_Tags.current)); spiderLine=3146640; spider_SetGadgetItemText_DEBUG(mainwindow$g_articleeditor._ListviewTags,v_item,datamodel$t_Tags.current._DefaultName); spiderLine=3146641; mainwindow$f_handler_tags(); } spiderLine=3146642; spiderLine=3146643; return 0; } function mainwindow$f_stringtobase64(v_string) { var v_size=0; var p_memory=0; var v_result=""; spiderLine=3146082;;;; spiderLine=3146084; v_size=spider_StringByteLength_DEBUG(v_string); spiderLine=3146085; if (v_size>0) { spiderLine=3146086; p_memory=spider_AllocateMemory_DEBUG(v_size,1); spiderLine=3146087; spider_PokeS_DEBUG(p_memory,0,v_string); spiderLine=3146088; v_result=spider_Base64Encoder_DEBUG(p_memory,0,v_size); spiderLine=3146089; spider_FreeMemory_DEBUG(p_memory); } spiderLine=3146090; spiderLine=3146091; if (1) return v_result; spiderLine=3146092; return ""; } function mainwindow$f_newtag_callback(v_success,v_result,v_userdata) { spiderLine=3146578; spiderLine=3146579; if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S80))) { spiderLine=3146580; spider_MessageRequester_DEBUG(_S81); spiderLine=3146581; if (1) return 0; } spiderLine=3146582; spiderLine=3146584; v_result=datamodel$f_stripprefix(v_result,_S80); spiderLine=3146586; spider_LastElement(datamodel$t_Tags); spiderLine=3146587; spider_AddElement_DEBUG(datamodel$t_Tags); spiderLine=3146588; datamodel$t_Tags.current._ID=spider_Val(datamodel$f_getfield(v_result,1)); spiderLine=3146589; datamodel$t_Tags.current._DefaultName=datamodel$f_getfield(v_result,2); spiderLine=3146590; datamodel$t_Tags.current._Color=datamodel$f_getfield(v_result,3); spiderLine=3146592; spider_AddGadgetItem_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$f_formattaglistitem(datamodel$t_Tags.current)); spiderLine=3146593; spider_SetGadgetItemData_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._ID); spiderLine=3146594; spider_SetGadgetState_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags)); spiderLine=3146595; spider_AddGadgetItem_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._DefaultName); spiderLine=3146596; spider_SetGadgetItemData_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._BinaryID); spiderLine=3146598; mainwindow$g_state._CurrentTagID=datamodel$t_Tags.current._ID; spiderLine=3146599; spider_HTTPRequest(0,_S1,_S60+spider_Str(mainwindow$g_state._CurrentTagID),mainwindow$f_edittag_callback); spiderLine=3146600; return 0; } function mainwindow$f_newarticle_callback(v_success,v_result,v_userdata) { spiderLine=3146452; spiderLine=3146453; if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S66))) { spiderLine=3146454; spider_MessageRequester_DEBUG(_S67); spiderLine=3146455; if (1) return 0; } spiderLine=3146456; spiderLine=3146458; v_result=datamodel$f_stripprefix(v_result,_S66); spiderLine=3146460; spider_LastElement(datamodel$t_Articles); spiderLine=3146461; spider_AddElement_DEBUG(datamodel$t_Articles); spiderLine=3146462; datamodel$t_Articles.current._ID=spider_Val(datamodel$f_getfield(v_result,1)); spiderLine=3146463; datamodel$t_Articles.current._Title=datamodel$f_getfield(v_result,2); spiderLine=3146464; datamodel$t_Articles.current._Draft=spider_Val(datamodel$f_getfield(v_result,3)); spiderLine=3146465; datamodel$t_Articles.current._Tags=spider_Val(datamodel$f_getfield(v_result,4)); spiderLine=3146466; datamodel$t_Articles.current._Date=spider_Val(datamodel$f_getfield(v_result,5)); spiderLine=3146468; spider_AddGadgetItem_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$f_formatarticlelistitem(datamodel$t_Articles.current)); spiderLine=3146469; spider_SetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$t_Articles.current._ID); spiderLine=3146471; mainwindow$g_state._CurrentArticleID=datamodel$t_Articles.current._ID; spiderLine=3146472; spider_HTTPRequest(0,_S1,_S49+spider_Str(mainwindow$g_state._CurrentArticleID),mainwindow$f_editarticle_callback); spiderLine=3146473; return 0; } function mainwindow$f_handler_newfile() { spiderLine=3146327; spiderLine=3146328; spider_OpenFileRequester_DEBUG(_S56,mainwindow$f_newfile_callback); spiderLine=3146329; return 0; } function mainwindow$f_createtageditorview() { spiderLine=3146039; spiderLine=3146040; mainwindow$g_tageditor._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10); spiderLine=3146042; spider_TextGadget_DEBUG(-1,20,20,80,20,_S41,8); spiderLine=3146043; mainwindow$g_tageditor._StringName=spider_StringGadget_DEBUG(-1,110,20,200,20,_S24); spiderLine=3146045; spider_TextGadget_DEBUG(-1,20,60,50,20,_S42,8); spiderLine=3146046; mainwindow$g_tageditor._StringColor=spider_StringGadget_DEBUG(-1,110,60,100,20,_S24); spiderLine=3146048; mainwindow$g_tageditor._Panel=spider_PanelGadget_DEBUG(-1,0,0,10,10); spiderLine=3146049; spider_ResetList(datamodel$t_Language); while (spider_NextElement(datamodel$t_Language)) { spiderLine=3146049; spiderLine=3146050; spider_AddElement_DEBUG(mainwindow$g_tageditor._LanguageTabs); spiderLine=3146051; spider_AddGadgetItem_DEBUG(mainwindow$g_tageditor._Panel,-1,datamodel$t_Language.current._s); spiderLine=3146053; spider_TextGadget_DEBUG(-1,20,20,100,20,_S43,8); spiderLine=3146054; mainwindow$g_tageditor._LanguageTabs.current._Name=spider_StringGadget_DEBUG(-1,130,20,200,20,_S24); spiderLine=3146055; } spiderLine=3146056; spider_CloseGadgetList_DEBUG(); spiderLine=3146058; mainwindow$g_tageditor._ButtonSave=spider_ButtonGadget_DEBUG(-1,0,0,180,25,_S32); spiderLine=3146059; spider_BindGadgetEvent_DEBUG(mainwindow$g_tageditor._ButtonSave,mainwindow$f_handler_updatetag); spiderLine=3146061; spider_CloseGadgetList_DEBUG(); spiderLine=3146062; spider_HideGadget_DEBUG(mainwindow$g_tageditor._Container,1); spiderLine=3146063; return 0; } function mainwindow$f_handler_files() { spiderLine=3146232; spiderLine=3146233; if (mainwindow$g_state._CurrentSelection!=2) { spiderLine=3146234; mainwindow$f_changeselection(); spiderLine=3146235; mainwindow$g_state._CurrentSelection=2; spiderLine=3146236; mainwindow$f_setmenuhighlight(mainwindow$g_menubar._Files); spiderLine=3146237; spider_HideGadget_DEBUG(mainwindow$g_filesview._Container,0); spiderLine=3146238; mainwindow$f_handler_resize(); } spiderLine=3146239; spiderLine=3146240; return 0; } function mainwindow$f_previewarticle_callback(v_success,v_result,v_userdata) { var v_url=""; spiderLine=3146569; spiderLine=3146570; if (!(v_success)) { spiderLine=3146571; spider_MessageRequester_DEBUG(_S77); spiderLine=3146572; if (1) return 0; } spiderLine=3146573; spiderLine=3146574; v_url=_S78+datamodel$f_stripprefix(v_result,_S79); spiderLine=3146575; mainwindow$f_openurlinnewtab(v_url); spiderLine=3146576; return 0; } function mainwindow$f_handler_edittag() { var v_item=0; spiderLine=3146361; spiderLine=3146362; v_item=spider_GetGadgetState_DEBUG(mainwindow$g_tagslist._ListIcon); spiderLine=3146363; if (v_item>=0) { spiderLine=3146364; mainwindow$g_state._CurrentTagID=spider_GetGadgetItemData_DEBUG(mainwindow$g_tagslist._ListIcon,v_item); spiderLine=3146365; spider_HTTPRequest(0,_S1,_S60+spider_Str(mainwindow$g_state._CurrentTagID),mainwindow$f_edittag_callback); } spiderLine=3146366; spiderLine=3146367; return 0; } function mainwindow$f_openurlinnewtab(v_url) { spiderLine=3146121; window.open(v_url, '_blank').focus(); spiderLine=3146123; return 0; } function mainwindow$f_uploadfile_callback(v_success,v_result,v_userdata) { spiderLine=3146536; spiderLine=3146537; if (!(v_success)) { spiderLine=3146538; spider_MessageRequester_DEBUG(_S74); spiderLine=3146539; if (1) return 0; } spiderLine=3146540; spiderLine=3146542; v_result=datamodel$f_stripprefix(v_result,_S75); spiderLine=3146544; spider_LastElement(datamodel$t_Files); spiderLine=3146545; spider_AddElement_DEBUG(datamodel$t_Files); spiderLine=3146546; datamodel$t_Files.current._ID=spider_Val(datamodel$f_getfield(v_result,1)); spiderLine=3146547; datamodel$t_Files.current._Name=datamodel$f_getfield(v_result,2); spiderLine=3146548; datamodel$t_Files.current._Type=spider_GetMapElement(datamodel$m_MIMETypes,spider_GetExtensionPart_DEBUG(datamodel$t_Files.current._Name))._s; spiderLine=3146550; spider_AddGadgetItem_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._Name+_S35+datamodel$t_Files.current._Type); spiderLine=3146551; spider_SetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._ID); spiderLine=3146552; return 0; } function mainwindow$f_setmenuhighlight(v_activegadget) { spiderLine=3146112; spiderLine=3146113; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Articles,1,16777215); spiderLine=3146114; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Files,1,16777215); spiderLine=3146115; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Tags,1,16777215); spiderLine=3146116; if (v_activegadget) { spiderLine=3146117; spider_SetGadgetColor_DEBUG(v_activegadget,1,10066329); } spiderLine=3146118; spiderLine=3146119; return 0; } function mainwindow$f_deletearticle_callback(v_success,v_result,v_userdata) { var v_selecteditem=0; var v_articleid=0; spiderLine=3146475; spiderLine=3146476; if (!(v_success)) { spiderLine=3146477; spider_MessageRequester_DEBUG(_S68); spiderLine=3146478; if (1) return 0; } spiderLine=3146479; spiderLine=3146481; v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon); spiderLine=3146482; v_articleid=spider_GetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,v_selecteditem); spiderLine=3146485; spider_RemoveGadgetItem_DEBUG(mainwindow$g_articlelist._ListIcon,v_selecteditem); spiderLine=3146488; if (datamodel$f_findarticlebyid(v_articleid)) { spiderLine=3146489; spider_DeleteElement_DEBUG(datamodel$t_Articles); } spiderLine=3146490; spiderLine=3146491; return 0; } function mainwindow$f_handler_updatetag() { var v_name=""; var v_textbundle=""; spiderLine=3146369;;; spiderLine=3146373; v_name=mainwindow$f_sanitizeurl(spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringName)); spiderLine=3146374; spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._StringName,v_name); spiderLine=3146376; spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) { spiderLine=3146376; spiderLine=3146377; if (datamodel$t_Tags.current._DefaultName==v_name) { spiderLine=3146378; if (datamodel$t_Tags.current._ID!=mainwindow$g_state._CurrentTagID) { spiderLine=3146379; spider.debug.Print(_S61); spiderLine=3146380; if (1) return 0; } spiderLine=3146381; } spiderLine=3146382; spiderLine=3146383; } spiderLine=3146385; v_textbundle=spider_Str(mainwindow$g_state._CurrentTagID)+_S52; spiderLine=3146386; v_textbundle=v_textbundle+spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringName)+_S52; spiderLine=3146387; v_textbundle=v_textbundle+spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringColor)+_S53; spiderLine=3146389; spider_ResetList(mainwindow$g_tageditor._LanguageTabs); while (spider_NextElement(mainwindow$g_tageditor._LanguageTabs)) { spiderLine=3146389; spiderLine=3146390; v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._LanguageTabs.current._Name))+_S53; spiderLine=3146391; } spiderLine=3146393; spider_HTTPRequest(1,_S1,_S62+v_textbundle,mainwindow$f_updatetag_callback); spiderLine=3146394; return 0; } function mainwindow$f_createarticleeditorview() { spiderLine=3145952; spiderLine=3145953; mainwindow$g_articleeditor._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10); spiderLine=3145955; spider_TextGadget_DEBUG(-1,20,20,50,20,_S23,8); spiderLine=3145956; mainwindow$g_articleeditor._StringTitle=spider_StringGadget_DEBUG(-1,80,20,510,20,_S24); spiderLine=3145958; spider_TextGadget_DEBUG(-1,20,60,50,20,_S25,8); spiderLine=3145959; mainwindow$g_articleeditor._Date=spider_DateGadget_DEBUG(-1,80,60,200,20); spiderLine=3145961; mainwindow$g_articleeditor._CheckboxDraft=spider_CheckBoxGadget_DEBUG(-1,570,60,60,20,_S26,2); spiderLine=3145963; mainwindow$g_articleeditor._ListviewTags=spider_ListViewGadget_DEBUG(-1,20,100,100,100,2); spiderLine=3145964; spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) { spiderLine=3145964; spiderLine=3145965; spider_AddGadgetItem_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._DefaultName); spiderLine=3145966; spider_SetGadgetItemData_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._BinaryID); spiderLine=3145967; } spiderLine=3145969; mainwindow$g_articleeditor._Panel=spider_PanelGadget_DEBUG(-1,0,0,10,10); spiderLine=3145970; spider_ResetList(datamodel$t_Language); while (spider_NextElement(datamodel$t_Language)) { spiderLine=3145970; spiderLine=3145971; spider_AddElement_DEBUG(mainwindow$g_articleeditor._LanguageTabs); spiderLine=3145972; spider_AddGadgetItem_DEBUG(mainwindow$g_articleeditor._Panel,-1,datamodel$t_Language.current._s); spiderLine=3145974; spider_TextGadget_DEBUG(-1,20,20,90,20,_S27,8); spiderLine=3145975; mainwindow$g_articleeditor._LanguageTabs.current._Name=spider_StringGadget_DEBUG(-1,130,20,80,20,_S24); spiderLine=3145977; spider_TextGadget_DEBUG(-1,20,60,60,20,_S28,8); spiderLine=3145978; mainwindow$g_articleeditor._LanguageTabs.current._Image=spider_StringGadget_DEBUG(-1,130,60,80,20,_S24); spiderLine=3145980; spider_TextGadget_DEBUG(-1,20,100,50,20,_S29,8); spiderLine=3145981; mainwindow$g_articleeditor._LanguageTabs.current._Blurb=spider_EditorGadget_DEBUG(-1,20,120,80,50,2); spiderLine=3145983; spider_TextGadget_DEBUG(-1,20,180,50,20,_S30,8); spiderLine=3145984; mainwindow$g_articleeditor._LanguageTabs.current._Content=spider_EditorGadget_DEBUG(-1,20,200,80,20); spiderLine=3145985; } spiderLine=3145986; spider_CloseGadgetList_DEBUG(); spiderLine=3145988; mainwindow$g_articleeditor._ButtonPreview=spider_ButtonGadget_DEBUG(-1,0,0,180,25,_S31); spiderLine=3145989; mainwindow$g_articleeditor._ButtonSave=spider_ButtonGadget_DEBUG(-1,0,0,180,25,_S32); spiderLine=3145990; spider_BindGadgetEvent_DEBUG(mainwindow$g_articleeditor._ButtonSave,mainwindow$f_handler_updatearticle); spiderLine=3145991; spider_BindGadgetEvent_DEBUG(mainwindow$g_articleeditor._ButtonPreview,mainwindow$f_handler_previewarticle); spiderLine=3145993; spider_CloseGadgetList_DEBUG(); spiderLine=3145994; spider_HideGadget_DEBUG(mainwindow$g_articleeditor._Container,1); spiderLine=3145995; return 0; } function mainwindow$f_editarticle_callback(v_success,v_result,v_userdata) { var v_entry=""; spiderLine=3146418;; spiderLine=3146421; if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S64))) { spiderLine=3146422; spider_MessageRequester_DEBUG(_S65); spiderLine=3146423; if (1) return 0; } spiderLine=3146424; spiderLine=3146426; v_result=datamodel$f_stripprefix(v_result,_S64); spiderLine=3146428; spider_ResetList_DEBUG(mainwindow$g_articleeditor._LanguageTabs); while (spider_NextElement_DEBUG(mainwindow$g_articleeditor._LanguageTabs)) { spiderLine=3146430; v_entry=datamodel$f_getrecord(v_result,(spider_ListIndex_DEBUG(mainwindow$g_articleeditor._LanguageTabs)+1)); spiderLine=3146431; spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name,datamodel$f_getfield(v_entry,1)); spiderLine=3146432; spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Image,datamodel$f_getfield(v_entry,2)); spiderLine=3146433; spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Blurb,datamodel$f_getfield(v_entry,3)); spiderLine=3146434; spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content,datamodel$f_getfield(v_entry,4)); spiderLine=3146435; } il_wend80:; spiderLine=3146437; if (datamodel$f_findarticlebyid(mainwindow$g_state._CurrentArticleID)) { spiderLine=3146438; spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle,datamodel$t_Articles.current._Title); spiderLine=3146439; spider_SetGadgetState_DEBUG(mainwindow$g_articleeditor._CheckboxDraft,datamodel$t_Articles.current._Draft); spiderLine=3146440; spider_SetGadgetState_DEBUG(mainwindow$g_articleeditor._Date,datamodel$t_Articles.current._Date); spiderLine=3146441; spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) { spiderLine=3146441; spiderLine=3146442; spider_SetGadgetItemState_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),((datamodel$t_Tags.current._BinaryID&datamodel$t_Articles.current._Tags)?1:0)); spiderLine=3146443; } } spiderLine=3146444; spiderLine=3146446; mainwindow$f_changeselection(); spiderLine=3146447; mainwindow$g_state._CurrentSelection=1; spiderLine=3146448; spider_HideGadget_DEBUG(mainwindow$g_articleeditor._Container,0); spiderLine=3146449; mainwindow$f_handler_resize(); spiderLine=3146450; return 0; } function mainwindow$f_openfile_callback(v_status,v_filename$,v_file,v_sizeread) { var p_buffer=0; spiderLine=3146499;; spiderLine=3146502; if (v_status!=0) { spiderLine=3146503; if (1) return 0; } spiderLine=3146504; spiderLine=3146506; p_buffer=spider_AllocateMemory_DEBUG(v_sizeread); spiderLine=3146507; spider_ReadData_DEBUG(v_file,p_buffer,0,v_sizeread); spiderLine=3146508; mainwindow$g_state._UploadBase64=spider_Base64Encoder_DEBUG(p_buffer,0,v_sizeread); spiderLine=3146509; spider_FreeMemory_DEBUG(p_buffer); spiderLine=3146510; spider_CloseFile_DEBUG(v_file); spiderLine=3146512; v_filename$=spider_ReplaceString_DEBUG(v_filename$,_S69,_S47); spiderLine=3146513; v_filename$=spider_StringField_DEBUG(v_filename$,(spider_CountString(v_filename$,_S47)+1),_S47); spiderLine=3146514; v_filename$=spider_InputRequester_DEBUG(_S70,_S58+v_filename$); spiderLine=3146515; v_filename$=spider_RemoveString_DEBUG(v_filename$,_S58,0,0,1); spiderLine=3146516; v_filename$=mainwindow$f_sanitizeurl(v_filename$); spiderLine=3146518; if (v_filename$==_S24) { spiderLine=3146519; if (1) return 0; } spiderLine=3146520; spiderLine=3146522; spider_ResetList(datamodel$t_Files); while (spider_NextElement(datamodel$t_Files)) { spiderLine=3146522; spiderLine=3146523; if (datamodel$t_Files.current._Name==v_filename$) { spiderLine=3146524; spider_MessageRequester_DEBUG(_S71); spiderLine=3146525; if (1) return 0; } spiderLine=3146526; spiderLine=3146527; } spiderLine=3146529; if (spider_Left(v_filename$,1)!=_S47) { spiderLine=3146530; v_filename$=_S47+v_filename$; } spiderLine=3146531; spiderLine=3146533; spider_HTTPRequest(1,_S1,_S72+v_filename$+_S73+mainwindow$g_state._UploadBase64,mainwindow$f_uploadfile_callback); spiderLine=3146534; return 0; } function mainwindow$f_handler_resize() { var v_winheight=0; var v_contentwidth=0; var v_contentx=0; var v_contenty=0; var v_contentheight=0; var v_menux=0; var v_panelwidth=0; var v_panelheight=0; var v_winwidth=0; spiderLine=3146129; spiderLine=3146130; v_winwidth=spider_WindowWidth_DEBUG(mainwindow$g_state._Window); spiderLine=3146131; v_winheight=spider_WindowHeight_DEBUG(mainwindow$g_state._Window); spiderLine=3146132; v_contentwidth=v_winwidth;; spiderLine=3146133; v_contentx=0; spiderLine=3146133; v_contenty=80;;;; spiderLine=3146136; if (v_winwidth<750) { spiderLine=3146137; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Container,0,0,v_winwidth,80); spiderLine=3146138; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Articles,15,55,-65535,-65535); spiderLine=3146139; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator0,66,55,-65535,-65535); spiderLine=3146140; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Files,85,55,-65535,-65535); spiderLine=3146141; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator1,123,55,-65535,-65535); spiderLine=3146142; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Tags,140,55,-65535,-65535); spiderLine=3146143; v_contentheight=(v_winheight+-80); spiderLine=3146144; } else { spiderLine=3146144; spiderLine=3146145; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Container,0,0,v_winwidth,60); spiderLine=3146146; v_menux=(v_winwidth+-185); spiderLine=3146147; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Articles,(v_menux+15),22,-65535,-65535); spiderLine=3146148; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator0,(v_menux+66),22,-65535,-65535); spiderLine=3146149; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Files,(v_menux+85),22,-65535,-65535); spiderLine=3146150; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator1,(v_menux+123),22,-65535,-65535); spiderLine=3146151; spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Tags,(v_menux+140),22,-65535,-65535); spiderLine=3146152; v_contentheight=(v_winheight+-160); spiderLine=3146153; v_contentwidth=spider_BankerRound((v_winwidth*0.8000000000000000444089209850062616169452667236328125)); spiderLine=3146154; if (v_contentwidth>950) { spiderLine=3146154; v_contentwidth=950; } spiderLine=3146154; spiderLine=3146155; v_contenty=(v_contenty+30); spiderLine=3146156; v_contentx=spider_BankerRound((((v_winwidth-v_contentwidth))*0.5)); } spiderLine=3146157; spiderLine=3146159; var sb_select3=mainwindow$g_state._CurrentSelection; spiderLine=3146160; if (sb_select3==0) { spiderLine=3146161; spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight); spiderLine=3146162; spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ListIcon,0,0,v_contentwidth,(v_contentheight+-40)); spiderLine=3146163; spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ButtonNew,(v_contentwidth+-130),(v_contentheight+-30),-65535,-65535); spiderLine=3146164; spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ButtonEdit,(v_contentwidth+-260),(v_contentheight+-30),-65535,-65535); spiderLine=3146165; spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ButtonDelete,(v_contentwidth+-390),(v_contentheight+-30),-65535,-65535); spiderLine=3146167; } else if (sb_select3==1) { spiderLine=3146168; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight); spiderLine=3146169; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._StringTitle,-65535,-65535,(v_contentwidth+-100),-65535); spiderLine=3146170; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Date,-65535,-65535,(v_contentwidth+-170),-65535); spiderLine=3146171; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._CheckboxDraft,(v_contentwidth+-80),60,60,-65535); spiderLine=3146172; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._ListviewTags,-65535,-65535,(v_contentwidth+-40),100); spiderLine=3146173; if (v_contentwidth>550) { spiderLine=3146174; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Panel,20,210,(v_contentwidth+-40),(v_contentheight+-265)); spiderLine=3146175; } else { spiderLine=3146175; spiderLine=3146176; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Panel,0,210,v_contentwidth,(v_contentheight+-265)); } spiderLine=3146177; spiderLine=3146178; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._ButtonPreview,20,(v_contentheight+-40),spider_BankerRound((((v_contentwidth+-60))*0.5)),25); spiderLine=3146179; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._ButtonSave,spider_BankerRound(((((v_contentwidth+-60))*0.5)+40)),(v_contentheight+-40),spider_BankerRound((((v_contentwidth+-60))*0.5)),25); spiderLine=3146180; v_panelwidth=spider_GadgetWidth_DEBUG(mainwindow$g_articleeditor._Panel); spiderLine=3146181; v_panelheight=spider_GadgetHeight_DEBUG(mainwindow$g_articleeditor._Panel); spiderLine=3146182; spider_ResetList(mainwindow$g_articleeditor._LanguageTabs); while (spider_NextElement(mainwindow$g_articleeditor._LanguageTabs)) { spiderLine=3146182; spiderLine=3146183; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name,-65535,-65535,(v_panelwidth+-150),-65535); spiderLine=3146184; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Image,-65535,-65535,(v_panelwidth+-150),-65535); spiderLine=3146185; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Blurb,-65535,-65535,(v_panelwidth+-40),-65535); spiderLine=3146186; spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content,-65535,-65535,(v_panelwidth+-40),(v_panelheight+-250)); spiderLine=3146187; } spiderLine=3146189; } else if (sb_select3==2) { spiderLine=3146190; spider_ResizeGadget_DEBUG(mainwindow$g_filesview._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight); spiderLine=3146191; spider_ResizeGadget_DEBUG(mainwindow$g_filesview._ListIcon,0,0,v_contentwidth,(v_contentheight+-40)); spiderLine=3146192; spider_ResizeGadget_DEBUG(mainwindow$g_filesview._ButtonNew,(v_contentwidth+-130),(v_contentheight+-30),-65535,-65535); spiderLine=3146193; spider_ResizeGadget_DEBUG(mainwindow$g_filesview._ButtonDelete,(v_contentwidth+-260),(v_contentheight+-30),-65535,-65535); spiderLine=3146195; } else if (sb_select3==3) { spiderLine=3146196; spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight); spiderLine=3146197; spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._ListIcon,0,0,v_contentwidth,(v_contentheight+-40)); spiderLine=3146198; spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._ButtonNew,(v_contentwidth+-130),(v_contentheight+-30),-65535,-65535); spiderLine=3146199; spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._ButtonEdit,(v_contentwidth+-260),(v_contentheight+-30),-65535,-65535); spiderLine=3146201; } else if (sb_select3==4) { spiderLine=3146202; spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight); spiderLine=3146203; spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._StringName,-65535,-65535,(v_contentwidth+-130),-65535); spiderLine=3146204; spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._StringColor,-65535,-65535,(v_contentwidth+-130),-65535); spiderLine=3146205; if (v_contentwidth>550) { spiderLine=3146206; spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._Panel,20,100,(v_contentwidth+-40),(v_contentheight+-155)); spiderLine=3146207; } else { spiderLine=3146207; spiderLine=3146208; spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._Panel,0,100,v_contentwidth,(v_contentheight+-155)); } spiderLine=3146209; spiderLine=3146210; spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._ButtonSave,20,(v_contentheight+-40),(v_contentwidth+-40),25); spiderLine=3146211; v_panelwidth=spider_GadgetWidth_DEBUG(mainwindow$g_tageditor._Panel); spiderLine=3146212; spider_ResetList(mainwindow$g_tageditor._LanguageTabs); while (spider_NextElement(mainwindow$g_tageditor._LanguageTabs)) { spiderLine=3146212; spiderLine=3146213; spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._LanguageTabs.current._Name,-65535,-65535,(v_panelwidth+-150),-65535); spiderLine=3146214; } } spiderLine=3146216; return 0; } function mainwindow$f_handler_updatearticle() { var v_tags=0; var v_title=""; var v_textbundle=""; spiderLine=3146276;;;; spiderLine=3146280; v_title=mainwindow$f_sanitizeurl(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle)); spiderLine=3146281; spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle,v_title); spiderLine=3146283; spider_ResetList(datamodel$t_Articles); while (spider_NextElement(datamodel$t_Articles)) { spiderLine=3146283; spiderLine=3146284; if (datamodel$t_Articles.current._Title==v_title) { spiderLine=3146285; if (datamodel$t_Articles.current._ID!=mainwindow$g_state._CurrentArticleID) { spiderLine=3146286; spider.debug.Print(_S51); spiderLine=3146287; if (1) return 0; } spiderLine=3146288; } spiderLine=3146289; spiderLine=3146290; } spiderLine=3146293; spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) { spiderLine=3146293; spiderLine=3146294; if (spider_GetGadgetItemState_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags))) { spiderLine=3146295; v_tags=(v_tags|datamodel$t_Tags.current._BinaryID); } spiderLine=3146296; spiderLine=3146297; } spiderLine=3146299; v_textbundle=spider_Str(mainwindow$g_state._CurrentArticleID)+_S52; spiderLine=3146300; v_textbundle=v_textbundle+v_title+_S52; spiderLine=3146301; v_textbundle=v_textbundle+spider_Str(spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._CheckboxDraft))+_S52; spiderLine=3146302; v_textbundle=v_textbundle+spider_Str(v_tags)+_S52; spiderLine=3146303; v_textbundle=v_textbundle+spider_Str(spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._Date))+_S53; spiderLine=3146305; spider_ResetList(mainwindow$g_articleeditor._LanguageTabs); while (spider_NextElement(mainwindow$g_articleeditor._LanguageTabs)) { spiderLine=3146305; spiderLine=3146306; v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name))+_S52; spiderLine=3146307; v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Image))+_S52; spiderLine=3146308; v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Blurb))+_S52; spiderLine=3146309; v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content))+_S53; spiderLine=3146310; } spiderLine=3146312; spider_HTTPRequest(1,_S1,_S54+v_textbundle,mainwindow$f_updatearticle_callback,v_tags); spiderLine=3146313; return 0; } function mainwindow$f_handler_newarticle() { spiderLine=3146256; spiderLine=3146257; spider_HTTPRequest(0,_S1,_S48,mainwindow$f_newarticle_callback); spiderLine=3146258; return 0; } function mainwindow$f_handler_articles() { spiderLine=3146222; spiderLine=3146223; if (mainwindow$g_state._CurrentSelection!=0) { spiderLine=3146224; mainwindow$f_changeselection(); spiderLine=3146225; mainwindow$g_state._CurrentSelection=0; spiderLine=3146226; mainwindow$f_setmenuhighlight(mainwindow$g_menubar._Articles); spiderLine=3146227; spider_HideGadget_DEBUG(mainwindow$g_articlelist._Container,0); spiderLine=3146228; mainwindow$f_handler_resize(); } spiderLine=3146229; spiderLine=3146230; return 0; } function mainwindow$f_createmenubar() { var v_titlegadget=0; spiderLine=3145897;; spiderLine=3145900; mainwindow$g_menubar._Font=spider_LoadFont_DEBUG(-1,_S12,20); spiderLine=3145901; mainwindow$g_menubar._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,60); spiderLine=3145902; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Container,2,2762786); spiderLine=3145904; v_titlegadget=spider_TextGadget_DEBUG(-1,10,0,170,60,_S11,9); spiderLine=3145905; spider_SetGadgetFont_DEBUG(v_titlegadget,spider_FontID_DEBUG(mainwindow$g_menubar._Font)); spiderLine=3145906; spider_SetGadgetColor_DEBUG(v_titlegadget,1,16777215); spiderLine=3145908; mainwindow$g_menubar._Articles=spider_HyperLinkGadget_DEBUG(-1,0,0,50,20,_S13,9078136); spiderLine=3145909; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Articles,1,10066329); spiderLine=3145910; spider_BindGadgetEvent_DEBUG(mainwindow$g_menubar._Articles,mainwindow$f_handler_articles); spiderLine=3145912; mainwindow$g_menubar._Separator0=spider_TextGadget_DEBUG(-1,0,0,10,20,_S14,8); spiderLine=3145913; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Separator0,1,16777215); spiderLine=3145915; mainwindow$g_menubar._Files=spider_HyperLinkGadget_DEBUG(-1,0,0,60,20,_S15,9078136); spiderLine=3145916; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Files,1,16777215); spiderLine=3145917; spider_BindGadgetEvent_DEBUG(mainwindow$g_menubar._Files,mainwindow$f_handler_files); spiderLine=3145919; mainwindow$g_menubar._Separator1=spider_TextGadget_DEBUG(-1,0,0,10,20,_S14,8); spiderLine=3145920; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Separator1,1,16777215); spiderLine=3145922; mainwindow$g_menubar._Tags=spider_HyperLinkGadget_DEBUG(-1,0,0,60,20,_S16,9078136); spiderLine=3145923; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Tags,1,16777215); spiderLine=3145924; spider_BindGadgetEvent_DEBUG(mainwindow$g_menubar._Tags,mainwindow$f_handler_tags); spiderLine=3145926; spider_CloseGadgetList_DEBUG(); spiderLine=3145927; return 0; } function mainwindow$f_deletefile_callback(v_success,v_result,v_userdata) { var v_selecteditem=0; var v_fileid=0; spiderLine=3146554; spiderLine=3146555; if (!(v_success)) { spiderLine=3146556; spider_MessageRequester_DEBUG(_S76); spiderLine=3146557; if (1) return 0; } spiderLine=3146558; spiderLine=3146560; v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_filesview._ListIcon); spiderLine=3146561; v_fileid=spider_GetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem); spiderLine=3146563; spider_RemoveGadgetItem_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem); spiderLine=3146564; if (datamodel$f_findfilebyid(v_fileid)) { spiderLine=3146565; spider_DeleteElement_DEBUG(datamodel$t_Files); } spiderLine=3146566; spiderLine=3146567; return 0; } function mainwindow$f_changeselection() { spiderLine=3146094; spiderLine=3146095; var sb_select2=mainwindow$g_state._CurrentSelection; spiderLine=3146096; if (sb_select2==0) { spiderLine=3146097; spider_HideGadget_DEBUG(mainwindow$g_articlelist._Container,1); spiderLine=3146098; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Articles,1,16777215); spiderLine=3146099; } else if (sb_select2==1) { spiderLine=3146100; spider_HideGadget_DEBUG(mainwindow$g_articleeditor._Container,1); spiderLine=3146101; } else if (sb_select2==2) { spiderLine=3146102; spider_HideGadget_DEBUG(mainwindow$g_filesview._Container,1); spiderLine=3146103; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Files,1,16777215); spiderLine=3146104; } else if (sb_select2==3) { spiderLine=3146105; spider_HideGadget_DEBUG(mainwindow$g_tagslist._Container,1); spiderLine=3146106; spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Tags,1,16777215); spiderLine=3146107; } else if (sb_select2==4) { spiderLine=3146108; spider_HideGadget_DEBUG(mainwindow$g_tageditor._Container,1); } spiderLine=3146110; return 0; } function mainwindow$f_handler_deletefile() { var v_selecteditem=0; var v_fileid=0; spiderLine=3146331; spiderLine=3146332; v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_filesview._ListIcon); spiderLine=3146333; if (v_selecteditem>-1) { spiderLine=3146334; v_fileid=spider_GetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem); spiderLine=3146335; spider_HTTPRequest(1,_S1,_S57+spider_Str(v_fileid),mainwindow$f_deletefile_callback); } spiderLine=3146336; spiderLine=3146337; return 0; } function mainwindow$f_createfilesview() { spiderLine=3145997; spiderLine=3145998; mainwindow$g_filesview._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10); spiderLine=3146000; mainwindow$g_filesview._ListIcon=spider_ListIconGadget_DEBUG(-1,0,0,10,10,_S33,200); spiderLine=3146001; spider_AddGadgetColumn_DEBUG(mainwindow$g_filesview._ListIcon,1,_S34,50); spiderLine=3146003; spider_ResetList(datamodel$t_Files); while (spider_NextElement(datamodel$t_Files)) { spiderLine=3146003; spiderLine=3146004; spider_AddGadgetItem_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._Name+_S35+datamodel$t_Files.current._Type); spiderLine=3146005; spider_SetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._ID); spiderLine=3146006; } spiderLine=3146008; mainwindow$g_filesview._ButtonNew=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S36); spiderLine=3146009; mainwindow$g_filesview._ButtonDelete=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S37); spiderLine=3146010; spider_BindGadgetEvent_DEBUG(mainwindow$g_filesview._ButtonNew,mainwindow$f_handler_newfile); spiderLine=3146011; spider_BindGadgetEvent_DEBUG(mainwindow$g_filesview._ButtonDelete,mainwindow$f_handler_deletefile); spiderLine=3146012; spider_BindGadgetEvent_DEBUG(mainwindow$g_filesview._ListIcon,mainwindow$f_handler_filelisticon); spiderLine=3146014; spider_CloseGadgetList_DEBUG(); spiderLine=3146015; spider_HideGadget_DEBUG(mainwindow$g_filesview._Container,1); spiderLine=3146016; return 0; } function mainwindow$f_handler_previewarticle() { var v_textbundle=""; spiderLine=3146315;; spiderLine=3146317; spider_SelectElement_DEBUG(mainwindow$g_articleeditor._LanguageTabs,spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._Panel)); spiderLine=3146318; v_textbundle=mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name))+_S52; spiderLine=3146319; v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content)); spiderLine=3146320; spider_HTTPRequest(1,_S1,_S55+v_textbundle,mainwindow$f_previewarticle_callback); spiderLine=3146321; return 0; } function mainwindow$f_handler_editarticle() { var v_item=0; spiderLine=3146260; spiderLine=3146261; v_item=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon); spiderLine=3146262; if (v_item>=0) { spiderLine=3146263; mainwindow$g_state._CurrentArticleID=spider_GetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,v_item); spiderLine=3146264; spider_HTTPRequest(0,_S1,_S49+spider_Str(mainwindow$g_state._CurrentArticleID),mainwindow$f_editarticle_callback); } spiderLine=3146265; spiderLine=3146266; return 0; } function datamodel$f_findarticlebyid(v_id) { spiderLine=4194362; spiderLine=4194363; spider_ResetList(datamodel$t_Articles); while (spider_NextElement(datamodel$t_Articles)) { spiderLine=4194363; spiderLine=4194364; if (datamodel$t_Articles.current._ID==v_id) { spiderLine=4194365; if (1) return 1; } spiderLine=4194366; spiderLine=4194367; } spiderLine=4194368; if (1) return 0; spiderLine=4194369; return 0; } function datamodel$f_findtagbyid(v_id) { spiderLine=4194380; spiderLine=4194381; spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) { spiderLine=4194381; spiderLine=4194382; if (datamodel$t_Tags.current._ID==v_id) { spiderLine=4194383; if (1) return 1; } spiderLine=4194384; spiderLine=4194385; } spiderLine=4194386; if (1) return 0; spiderLine=4194387; return 0; } function datamodel$f_getrecordcount(v_result) { spiderLine=4194326; spiderLine=4194327; if (1) return spider_CountString(v_result,_S53); spiderLine=4194328; return 0; } function datamodel$f_loadmimetypes() { var v_type=""; var v_ext=""; spiderLine=4194393;;; spiderLine=4194396; sb_datapointer=datamodel$ll_loadmimetypes_mimedata; spiderLine=4194397; v_ext=sb_data[sb_datapointer++]; while (v_ext!=_S87) { spiderLine=4194399; v_type=sb_data[sb_datapointer++]; spiderLine=4194400; spider_GetMapElement(datamodel$m_MIMETypes,v_ext)._s=v_type; spiderLine=4194401; v_ext=sb_data[sb_datapointer++]; spiderLine=4194402; } il_wend130:; spiderLine=4194403; return 0; } function datamodel$f_formatarticlelistitem(p_article) { var v_status=""; spiderLine=4194342;; spiderLine=4194345; if (p_article._Draft) { spiderLine=4194346; v_status=_S26; spiderLine=4194347; } else { spiderLine=4194347; spiderLine=4194348; v_status=_S85; } spiderLine=4194349; spiderLine=4194351; if (1) return p_article._Title+_S35+v_status+_S35+spider_FormatDate(_S86,p_article._Date); spiderLine=4194352; return ""; } function datamodel$f_getrecord(v_result,v_index) { spiderLine=4194330; spiderLine=4194331; if (1) return spider_StringField_DEBUG(v_result,v_index,_S53); spiderLine=4194332; return ""; } function datamodel$f_stripprefix(v_result,v_prefix) { spiderLine=4194318; spiderLine=4194319; if (1) return spider_RemoveString_DEBUG(v_result,v_prefix,0,0,1); spiderLine=4194320; return ""; } function datamodel$f_getfield(v_record,v_index) { spiderLine=4194322; spiderLine=4194323; if (1) return spider_StringField_DEBUG(v_record,v_index,_S52); spiderLine=4194324; return ""; } function datamodel$f_validateresponse(v_result,v_expectedprefix) { spiderLine=4194334; spiderLine=4194335; if (1) return spider_CastByte((spider_Left(v_result,spider_Len(v_expectedprefix))==v_expectedprefix?1:0)); spiderLine=4194336; return 0; } function datamodel$f_formattaglistitem(p_tag) { spiderLine=4194354; spiderLine=4194355; if (1) return p_tag._DefaultName+_S35+p_tag._Color; spiderLine=4194356; return ""; } function datamodel$f_findfilebyid(v_id) { spiderLine=4194371; spiderLine=4194372; spider_ResetList(datamodel$t_Files); while (spider_NextElement(datamodel$t_Files)) { spiderLine=4194372; spiderLine=4194373; if (datamodel$t_Files.current._ID==v_id) { spiderLine=4194374; if (1) return 1; } spiderLine=4194375; spiderLine=4194376; } spiderLine=4194377; if (1) return 0; spiderLine=4194378; return 0; } var datamodel$ll_loadmimetypes_mimedata=datamodel$l_mimedata; SpiderLaunch = function() { spider.debug.Init(); spider_InitFunctions(); spiderLine=1048576; spiderLine=1048634; datamodel$m_MIMETypes=spider_NewMap(s_string,true);; spiderLine=1048635; datamodel$t_Language=spider_NewList(s_string,"_s",true);; spiderLine=1048636; datamodel$t_Tags=spider_NewList(datamodel$tag,"object",false);; spiderLine=1048637; datamodel$t_Files=spider_NewList(datamodel$file,"object",false);; spiderLine=1048638; datamodel$t_Articles=spider_NewList(datamodel$article,"object",false);; spiderLine=1048661; spiderLine=2097152; spiderLine=2097169; general$g_loadingprogress=0; spiderLine=2097283; spiderLine=3145728;;;;;;;; spiderLine=3146646; spiderLine=4194304; spiderLine=4194406; datamodel$f_loadmimetypes(); spiderLine=4194451; spiderLine=11; general$f_init(); spiderLine=13; } function spider_InitFunctions() { spider_InitMap(); spider_Event_Init(); spider_InitFont(); spider_InitDesktop(); spider_InitImageDecoder(); spider_InitImage(); spider_Init2DDrawing(); spider_InitWindow(); spider_InitList(); spider_InitGadget(); spider_InitArray(); } spider.nbLoadedModules++ var sb_data = ["aac","audio/aac" ,"abw","application/x-abiword" ,"apng","image/apng" ,"avi","video/x-msvideo" ,"bin","application/octet-stream" ,"bmp","image/bmp" ,"css","text/css" ,"csv","text/csv" ,"doc","application/msword" ,"gif","image/gif" ,"htm","text/html" ,"html","text/html" ,"ico","image/x-icon" ,"jpeg","image/jpeg" ,"jpg","image/jpeg" ,"js","text/javascript" ,"json","application/json" ,"mp3","audio/mpeg" ,"mp4","video/mp4" ,"mpeg","video/mpeg" ,"otf","font/otf" ,"png","image/png" ,"pdf","application/pdf" ,"php","application/x-httpd-php" ,"svg","image/svg+xml" ,"txt","text/plain" ,"wav","audio/wav" ,"webm","video/webm" ,"webp","image/webp" ,"woff","font/woff" ,"woff2","font/woff2" ,"xml","application/xml" ,"zip","application/zip" ,"END" ];